home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / D-G / Drop UNIX 1.1.sit / Drop UNIX 1.1 / DropUNIX Library ƒ / Lib Sources / DSUserProcs.c < prev    next >
MacBinary  |  1995-05-25  |  19.4 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Thu May 25 02:50:38 1995, modified Thu May 25 02:50:38 1995, creator 'MMCC', type ASCII, 18906 bytes "DSUserProcs.c" , at 0x4a5a 724 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 44 53 55 73 65 72 | 50 72 6f 63 73 2e 63 00 |..DSUser|Procs.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 49 da 00 | 00 02 d4 ab e9 d9 3e ab |.....I..|......>.|
|00000060| e9 d9 3e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..>.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 44 44 00 00 |........|....DD..|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 0d |********|*******.|
|000000d0| 2a 2a 0d 2a 2a 20 20 50 | 72 6f 6a 65 63 74 20 4e |**.** P|roject N|
|000000e0| 61 6d 65 3a 09 44 72 6f | 70 53 68 65 6c 6c 0d 2a |ame:.Dro|pShell.*|
|000000f0| 2a 20 20 20 20 20 46 69 | 6c 65 20 4e 61 6d 65 3a |* Fi|le Name:|
|00000100| 09 44 53 55 73 65 72 50 | 72 6f 63 73 2e 63 0d 2a |.DSUserP|rocs.c.*|
|00000110| 2a 0d 2a 2a 20 20 20 44 | 65 73 63 72 69 70 74 69 |*.** D|escripti|
|00000120| 6f 6e 3a 09 53 70 65 63 | 69 66 69 63 20 41 70 70 |on:.Spec|ific App|
|00000130| 6c 65 45 76 65 6e 74 20 | 68 61 6e 64 6c 65 72 73 |leEvent |handlers|
|00000140| 20 75 73 65 64 20 62 79 | 20 74 68 65 20 44 72 6f | used by| the Dro|
|00000150| 70 42 6f 78 0d 2a 2a 0d | 2a 2a 2a 2a 2a 2a 2a 2a |pBox.**.|********|
|00000160| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000170| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001a0| 2a 2a 2a 2a 2a 2a 2a 0d | 2a 2a 20 20 20 20 20 20 |*******.|** |
|000001b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000001c0| 20 41 20 55 20 54 20 48 | 20 4f 20 52 20 20 20 49 | A U T H| O R I|
|000001d0| 20 44 20 45 20 4e 20 54 | 20 49 20 54 20 59 0d 2a | D E N T| I T Y.*|
|000001e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000200| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000210| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000220| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 0d 2a |********|******.*|
|00000230| 2a 0d 2a 2a 09 49 6e 69 | 74 69 61 6c 73 09 4e 61 |*.**.Ini|tials.Na|
|00000240| 6d 65 0d 2a 2a 09 2d 2d | 2d 2d 2d 2d 2d 2d 09 2d |me.**.--|------.-|
|00000250| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000260| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000270| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0d 2a |--------|------.*|
|00000280| 2a 09 4c 44 52 09 09 09 | 4c 65 6f 6e 61 72 64 20 |*.LDR...|Leonard |
|00000290| 52 6f 73 65 6e 74 68 6f | 6c 0d 2a 2a 09 4d 54 43 |Rosentho|l.**.MTC|
|000002a0| 09 09 09 4d 61 72 73 68 | 61 6c 6c 20 43 6c 6f 77 |...Marsh|all Clow|
|000002b0| 0d 2a 2a 09 53 43 53 09 | 09 09 53 74 65 70 68 61 |.**.SCS.|..Stepha|
|000002c0| 6e 20 53 6f 6d 6f 67 79 | 69 0d 2a 2a 0d 2a 2a 2a |n Somogy|i.**.***|
|000002d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000300| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000310| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 0d 2a 2a 20 |********|****.** |
|00000320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000330| 20 20 20 20 20 52 20 45 | 20 56 20 49 20 53 20 49 | R E| V I S I|
|00000340| 20 4f 20 4e 20 20 20 48 | 20 49 20 53 20 54 20 4f | O N H| I S T O|
|00000350| 20 52 20 59 0d 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | R Y.***|********|
|00000360| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000370| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000380| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000390| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003a0| 2a 2a 2a 2a 0d 2a 2a 0d | 2a 2a 09 20 20 44 61 74 |****.**.|**. Dat|
|000003b0| 65 09 09 54 69 6d 65 09 | 41 75 74 68 6f 72 09 44 |e..Time.|Author.D|
|000003c0| 65 73 63 72 69 70 74 69 | 6f 6e 0d 2a 2a 09 2d 2d |escripti|on.**.--|
|000003d0| 2d 2d 2d 2d 2d 2d 09 2d | 2d 2d 2d 2d 09 2d 2d 2d |------.-|----.---|
|000003e0| 2d 2d 2d 09 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |---.----|--------|
|000003f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000400| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000410| 2d 0d 2a 2a 09 30 36 2f | 32 33 2f 39 34 09 09 09 |-.**.06/|23/94...|
|00000420| 4c 44 52 09 09 41 64 64 | 65 64 20 73 75 70 70 6f |LDR..Add|ed suppo|
|00000430| 72 74 20 66 6f 72 20 50 | 72 6f 63 65 73 73 49 74 |rt for P|rocessIt|
|00000440| 65 6d 20 61 6e 64 20 50 | 72 6f 63 65 73 73 46 6f |em and P|rocessFo|
|00000450| 6c 64 65 72 20 68 61 6e | 64 6c 69 6e 67 0d 2a 2a |lder han|dling.**|
|00000460| 09 30 32 2f 32 30 2f 39 | 34 09 09 09 4c 44 52 09 |.02/20/9|4...LDR.|
|00000470| 09 4d 6f 64 69 66 69 65 | 64 20 50 72 65 66 6c 69 |.Modifie|d Prefli|
|00000480| 67 68 74 20 26 20 50 6f | 73 74 66 6c 69 67 68 74 |ght & Po|stflight|
|00000490| 20 74 6f 20 74 61 6b 65 | 20 69 74 65 6d 20 63 6f | to take| item co|
|000004a0| 75 6e 74 0d 2a 2a 09 30 | 31 2f 32 35 2f 39 32 09 |unt.**.0|1/25/92.|
|000004b0| 09 09 4c 44 52 09 09 52 | 65 6d 6f 76 65 64 20 74 |..LDR..R|emoved t|
|000004c0| 68 65 20 75 73 65 20 6f | 66 20 63 6f 6e 73 74 20 |he use o|f const |
|000004d0| 6f 6e 20 74 68 65 20 75 | 73 65 72 44 61 74 61 48 |on the u|serDataH|
|000004e0| 61 6e 64 6c 65 0d 2a 2a | 09 31 32 2f 30 39 2f 39 |andle.**|.12/09/9|
|000004f0| 31 09 09 09 4c 44 52 09 | 09 41 64 64 65 64 20 74 |1...LDR.|.Added t|
|00000500| 68 65 20 6e 65 77 20 53 | 65 6c 65 63 74 46 69 6c |he new S|electFil|
|00000510| 65 20 75 73 65 72 50 72 | 6f 63 0d 2a 2a 09 09 09 |e userPr|oc.**...|
|00000520| 09 09 09 09 09 41 64 64 | 65 64 20 74 68 65 20 6e |.....Add|ed the n|
|00000530| 65 77 20 49 6e 73 74 61 | 6c 6c 20 26 20 44 69 73 |ew Insta|ll & Dis|
|00000540| 70 6f 73 65 55 73 65 72 | 47 6c 6f 62 61 6c 73 20 |poseUser|Globals |
|00000550| 70 72 6f 63 73 0d 2a 2a | 09 09 09 09 09 09 09 09 |procs.**|........|
|00000560| 4d 6f 64 69 66 69 65 64 | 20 50 6f 73 74 46 6c 69 |Modified| PostFli|
|00000570| 67 68 74 20 74 6f 20 6f | 6e 6c 79 20 61 75 74 6f |ght to o|nly auto|
|00000580| 71 75 69 74 20 6f 6e 20 | 6f 64 6f 63 2c 20 6e 6f |quit on |odoc, no|
|00000590| 74 20 70 64 6f 63 0d 2a | 2a 09 31 31 2f 32 34 2f |t pdoc.*|*.11/24/|
|000005a0| 39 31 09 09 09 4c 44 52 | 09 09 41 64 64 65 64 20 |91...LDR|..Added |
|000005b0| 74 68 65 20 75 73 65 72 | 50 72 6f 63 73 20 66 6f |the user|Procs fo|
|000005c0| 72 20 70 64 6f 63 20 68 | 61 6e 64 6c 65 72 0d 2a |r pdoc h|andler.*|
|000005d0| 2a 09 09 09 09 09 09 09 | 09 43 6c 65 61 6e 65 64 |*.......|.Cleaned|
|000005e0| 20 75 70 20 74 68 65 20 | 70 6c 61 63 65 6d 65 6e | up the |placemen|
|000005f0| 74 20 6f 66 20 62 72 61 | 63 65 73 0d 2a 2a 09 09 |t of bra|ces.**..|
|00000600| 09 09 09 09 09 09 41 64 | 64 65 64 20 74 68 65 20 |......Ad|ded the |
|00000610| 70 61 73 73 69 6e 67 20 | 6f 66 20 61 20 75 73 65 |passing |of a use|
|00000620| 72 44 61 74 61 48 61 6e | 64 6c 65 0d 2a 2a 09 31 |rDataHan|dle.**.1|
|00000630| 30 2f 32 39 2f 39 31 09 | 09 09 53 43 53 09 09 43 |0/29/91.|..SCS..C|
|00000640| 68 61 6e 67 65 73 20 66 | 6f 72 20 54 48 49 4e 4b |hanges f|or THINK|
|00000650| 20 43 20 35 0d 2a 2a 09 | 31 30 2f 32 38 2f 39 31 | C 5.**.|10/28/91|
|00000660| 09 09 09 4c 44 52 09 09 | 4f 66 66 69 63 69 61 6c |...LDR..|Official|
|00000670| 6c 79 20 72 65 6e 61 6d | 65 64 20 44 72 6f 70 53 |ly renam|ed DropS|
|00000680| 68 65 6c 6c 20 28 66 72 | 6f 6d 20 51 75 69 63 6b |hell (fr|om Quick|
|00000690| 53 68 65 6c 6c 29 0d 2a | 2a 09 09 09 09 09 09 09 |Shell).*|*.......|
|000006a0| 09 41 64 64 65 64 20 61 | 20 62 75 6e 63 68 20 6f |.Added a| bunch o|
|000006b0| 66 20 63 6f 6d 6d 65 6e | 74 73 20 66 6f 72 20 63 |f commen|ts for c|
|000006c0| 6c 61 72 69 66 69 63 61 | 74 69 6f 6e 0d 2a 2a 09 |larifica|tion.**.|
|000006d0| 31 30 2f 30 36 2f 39 31 | 09 30 30 3a 30 32 09 4d |10/06/91|.00:02.M|
|000006e0| 54 43 09 09 43 6f 6e 76 | 65 72 74 65 64 20 74 6f |TC..Conv|erted to|
|000006f0| 20 4d 50 57 20 43 0d 2a | 2a 09 30 34 2f 30 39 2f | MPW C.*|*.04/09/|
|00000700| 39 31 09 30 30 3a 30 32 | 09 4c 44 52 09 09 41 64 |91.00:02|.LDR..Ad|
|00000710| 64 65 64 20 74 6f 20 50 | 72 6f 6a 65 63 74 6f 72 |ded to P|rojector|
|00000720| 0d 2a 2a 0d 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.**.****|********|
|00000730| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000740| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000750| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000760| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000770| 2a 2a 2f 0d 0d 2f 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |**/../**|********|
|00000780| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000790| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000007a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000007b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000007c0| 2a 2a 2a 2a 0d 2a 2a 0d | 2a 2a 09 44 72 6f 70 55 |****.**.|**.DropU|
|000007d0| 6e 69 78 20 68 69 73 74 | 6f 72 79 3a 09 4b 52 42 |nix hist|ory:.KRB|
|000007e0| 20 3d 20 4b 65 76 69 6e | 20 52 2e 20 42 6f 79 63 | = Kevin| R. Boyc|
|000007f0| 65 2c 20 52 57 44 20 3d | 20 52 79 61 6e 20 44 61 |e, RWD =| Ryan Da|
|00000800| 76 69 73 0d 2a 2a 0d 2a | 2a 09 30 34 2f 32 31 2f |vis.**.*|*.04/21/|
|00000810| 39 35 09 09 4b 52 42 09 | 09 41 64 64 65 64 20 63 |95..KRB.|.Added c|
|00000820| 6f 6e 64 69 74 69 6f 6e | 61 6c 20 63 6f 6d 70 69 |ondition|al compi|
|00000830| 6c 61 74 69 6f 6e 20 66 | 6f 72 20 54 68 69 6e 6b |lation f|or Think|
|00000840| 20 43 20 28 55 6e 69 76 | 65 72 73 61 6c 20 68 65 | C (Univ|ersal he|
|00000850| 61 64 65 72 73 2c 0d 2a | 2a 09 09 09 09 09 09 09 |aders,.*|*.......|
|00000860| 20 62 75 74 20 6f 6c 64 | 20 41 4e 53 49 2f 63 6f | but old| ANSI/co|
|00000870| 6e 73 6f 6c 65 20 6c 69 | 62 72 61 72 79 29 2e 0d |nsole li|brary)..|
|00000880| 2a 2a 09 30 34 2f 3f 3f | 2f 39 35 09 09 52 57 44 |**.04/??|/95..RWD|
|00000890| 09 09 46 69 72 73 74 20 | 72 65 6c 65 61 73 65 2e |..First |release.|
|000008a0| 0d 2a 2a 0d 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.**.****|********|
|000008b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000008c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000008d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000008e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000008f0| 2a 2a 2a 2a 2f 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |****/..#|include |
|00000900| 3c 46 69 6c 65 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<Files.h|>.#inclu|
|00000910| 64 65 20 3c 53 74 61 6e | 64 61 72 64 46 69 6c 65 |de <Stan|dardFile|
|00000920| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |.h>.#inc|lude <st|
|00000930| 64 6c 69 62 2e 68 3e 09 | 09 09 2f 2a 20 46 6f 72 |dlib.h>.|../* For|
|00000940| 20 6d 61 6c 6c 6f 63 20 | 26 20 66 72 65 65 20 2a | malloc |& free *|
|00000950| 2f 0d 23 69 6e 63 6c 75 | 64 65 20 3c 73 74 72 69 |/.#inclu|de <stri|
|00000960| 6e 67 2e 68 3e 09 09 09 | 2f 2a 20 46 6f 72 20 73 |ng.h>...|/* For s|
|00000970| 74 72 63 70 79 20 2a 2f | 0d 23 69 6e 63 6c 75 64 |trcpy */|.#includ|
|00000980| 65 20 3c 73 74 64 69 6f | 2e 68 3e 0d 0d 23 69 66 |e <stdio|.h>..#if|
|00000990| 64 65 66 20 5f 5f 4d 57 | 45 52 4b 53 5f 5f 0d 23 |def __MW|ERKS__.#|
|000009a0| 69 6e 63 6c 75 64 65 20 | 3c 53 49 4f 55 58 2e 68 |include |<SIOUX.h|
|000009b0| 3e 09 09 09 2f 2a 20 54 | 6f 20 6d 61 6e 69 70 75 |>.../* T|o manipu|
|000009c0| 6c 61 74 65 20 74 68 65 | 20 63 6f 6e 73 6f 6c 65 |late the| console|
|000009d0| 20 2a 2f 0d 23 65 6e 64 | 69 66 0d 0d 23 69 66 64 | */.#end|if..#ifd|
|000009e0| 65 66 20 54 48 49 4e 4b | 5f 43 0d 09 23 69 6e 63 |ef THINK|_C..#inc|
|000009f0| 6c 75 64 65 20 3c 70 61 | 73 63 61 6c 2e 68 3e 0d |lude <pa|scal.h>.|
|00000a00| 09 65 78 74 65 72 6e 20 | 57 69 6e 64 6f 77 50 74 |.extern |WindowPt|
|00000a10| 72 09 67 53 70 6c 61 73 | 68 53 63 72 65 65 6e 3b |r.gSplas|hScreen;|
|00000a20| 09 09 2f 2a 20 4e 65 65 | 64 65 64 20 66 6f 72 20 |../* Nee|ded for |
|00000a30| 75 6e 68 69 6c 69 74 69 | 6e 67 20 54 48 49 4e 4b |unhiliti|ng THINK|
|00000a40| 20 43 20 63 6f 6e 73 6f | 6c 65 20 2d 2d 4b 52 42 | C conso|le --KRB|
|00000a50| 20 2a 2f 0d 23 65 6e 64 | 69 66 0d 0d 23 69 6e 63 | */.#end|if..#inc|
|00000a60| 6c 75 64 65 20 22 44 53 | 47 6c 6f 62 61 6c 73 2e |lude "DS|Globals.|
|00000a70| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 44 53 55 |h".#incl|ude "DSU|
|00000a80| 73 65 72 50 72 6f 63 73 | 2e 68 22 0d 0d 2f 2f 20 |serProcs|.h"..// |
|00000a90| 23 64 65 66 69 6e 65 20 | 6d 61 6c 6c 6f 63 09 4e |#define |malloc.N|
|00000aa0| 65 77 50 74 72 0d 2f 2f | 20 23 64 65 66 69 6e 65 |ewPtr.//| #define|
|00000ab0| 20 66 72 65 65 09 44 69 | 73 70 6f 73 65 50 74 72 | free.Di|sposePtr|
|00000ac0| 0d 23 64 65 66 69 6e 65 | 20 56 61 6c 69 64 61 74 |.#define| Validat|
|00000ad0| 65 50 74 72 28 70 74 72 | 29 20 5c 0d 09 69 66 20 |ePtr(ptr|) \..if |
|00000ae0| 28 21 70 74 72 29 20 7b | 5c 0d 09 09 70 72 69 6e |(!ptr) {|\...prin|
|00000af0| 74 66 28 22 45 72 72 6f | 72 20 61 6c 6c 6f 63 61 |tf("Erro|r alloca|
|00000b00| 74 69 6e 67 20 6d 65 6d | 6f 72 79 21 20 45 72 72 |ting mem|ory! Err|
|00000b10| 6f 72 20 23 25 64 5c 6e | 22 2c 20 4d 65 6d 45 72 |or #%d\n|", MemEr|
|00000b20| 72 6f 72 28 29 20 29 3b | 5c 0d 09 09 65 78 69 74 |ror() );|\...exit|
|00000b30| 28 2d 31 29 3b 5c 0d 09 | 7d 0d 0d 2f 2a 20 55 73 |(-1);\..|}../* Us|
|00000b40| 65 72 20 53 74 72 75 63 | 74 73 20 2a 2f 0d 09 74 |er Struc|ts */..t|
|00000b50| 79 70 65 64 65 66 20 73 | 74 72 75 63 74 20 7b 0d |ypedef s|truct {.|
|00000b60| 09 09 75 6e 73 69 67 6e | 65 64 20 69 6e 74 20 63 |..unsign|ed int c|
|00000b70| 6f 75 6e 74 3b 0d 09 09 | 63 68 61 72 20 2a 2a 20 |ount;...|char ** |
|00000b80| 6e 61 6d 65 73 3b 0d 09 | 7d 20 66 69 6c 65 4e 61 |names;..|} fileNa|
|00000b90| 6d 65 4c 69 73 74 2c 20 | 2a 66 69 6c 65 4e 61 6d |meList, |*fileNam|
|00000ba0| 65 50 74 72 2c 20 2a 2a | 66 69 6c 65 4e 61 6d 65 |ePtr, **|fileName|
|00000bb0| 48 61 6e 64 6c 65 3b 0d | 0d 2f 2a 20 53 74 61 74 |Handle;.|./* Stat|
|00000bc0| 69 63 20 50 72 6f 74 6f | 74 79 70 65 73 20 2a 2f |ic Proto|types */|
|00000bd0| 0d 09 73 74 61 74 69 63 | 20 4f 53 45 72 72 20 50 |..static| OSErr P|
|00000be0| 72 6f 63 65 73 73 46 6f | 6c 64 65 72 28 46 53 53 |rocessFo|lder(FSS|
|00000bf0| 70 65 63 50 74 72 20 6d | 79 46 53 53 50 74 72 2c |pecPtr m|yFSSPtr,|
|00000c00| 20 48 61 6e 64 6c 65 20 | 75 73 65 72 44 61 74 61 | Handle |userData|
|00000c10| 48 61 6e 64 6c 65 29 3b | 0d 09 73 74 61 74 69 63 |Handle);|..static|
|00000c20| 20 4f 53 45 72 72 20 50 | 72 6f 63 65 73 73 49 74 | OSErr P|rocessIt|
|00000c30| 65 6d 28 46 53 53 70 65 | 63 50 74 72 20 6d 79 46 |em(FSSpe|cPtr myF|
|00000c40| 53 53 50 74 72 2c 20 48 | 61 6e 64 6c 65 20 75 73 |SSPtr, H|andle us|
|00000c50| 65 72 44 61 74 61 48 61 | 6e 64 6c 65 29 3b 0d 09 |erDataHa|ndle);..|
|00000c60| 73 74 61 74 69 63 20 76 | 6f 69 64 20 53 65 74 41 |static v|oid SetA|
|00000c70| 70 70 6c 69 63 61 74 69 | 6f 6e 4e 61 6d 65 28 48 |pplicati|onName(H|
|00000c80| 61 6e 64 6c 65 20 75 73 | 65 72 44 61 74 61 48 61 |andle us|erDataHa|
|00000c90| 6e 64 6c 65 29 3b 0d 09 | 73 74 61 74 69 63 20 76 |ndle);..|static v|
|00000ca0| 6f 69 64 20 41 6c 6c 6f | 63 61 74 65 41 70 70 4e |oid Allo|cateAppN|
|00000cb0| 61 6d 65 73 28 48 61 6e | 64 6c 65 20 2a 75 73 65 |ames(Han|dle *use|
|00000cc0| 72 44 61 74 61 48 61 6e | 64 6c 65 2c 20 75 6e 73 |rDataHan|dle, uns|
|00000cd0| 69 67 6e 65 64 20 6c 6f | 6e 67 20 6e 75 6d 4f 66 |igned lo|ng numOf|
|00000ce0| 46 69 6c 65 73 29 3b 0d | 09 73 74 61 74 69 63 20 |Files);.|.static |
|00000cf0| 76 6f 69 64 20 44 65 61 | 6c 6c 6f 63 61 74 65 41 |void Dea|llocateA|
|00000d00| 70 70 4e 61 6d 65 73 28 | 48 61 6e 64 6c 65 20 75 |ppNames(|Handle u|
|00000d10| 73 65 72 44 61 74 61 48 | 61 6e 64 6c 65 29 3b 0d |serDataH|andle);.|
|00000d20| 0d 2f 2a 0d 09 54 68 69 | 73 20 72 6f 75 74 69 6e |./*..Thi|s routin|
|00000d30| 65 20 69 73 20 63 61 6c | 6c 65 64 20 64 75 72 69 |e is cal|led duri|
|00000d40| 6e 67 20 69 6e 69 74 20 | 74 69 6d 65 2e 0d 09 0d |ng init |time....|
|00000d50| 09 49 74 20 61 6c 6c 6f | 77 73 20 79 6f 75 20 74 |.It allo|ws you t|
|00000d60| 6f 20 69 6e 73 74 61 6c | 6c 20 6d 6f 72 65 20 41 |o instal|l more A|
|00000d70| 45 56 54 20 48 61 6e 64 | 6c 65 72 73 20 62 65 79 |EVT Hand|lers bey|
|00000d80| 6f 6e 64 20 74 68 65 20 | 73 74 61 6e 64 61 72 64 |ond the |standard|
|00000d90| 20 66 6f 75 72 0d 2a 2f | 0d 0d 70 61 73 63 61 6c | four.*/|..pascal|
|00000da0| 20 76 6f 69 64 20 49 6e | 73 74 61 6c 6c 4f 74 68 | void In|stallOth|
|00000db0| 65 72 45 76 65 6e 74 73 | 20 28 76 6f 69 64 29 20 |erEvents| (void) |
|00000dc0| 7b 0d 7d 0d 0d 0d 2f 2a | 09 0d 09 54 68 69 73 20 |{.}.../*|...This |
|00000dd0| 72 6f 75 74 69 6e 65 20 | 69 73 20 63 61 6c 6c 65 |routine |is calle|
|00000de0| 64 20 77 68 65 6e 20 61 | 6e 20 4f 41 50 50 20 65 |d when a|n OAPP e|
|00000df0| 76 65 6e 74 20 69 73 20 | 72 65 63 65 69 76 65 64 |vent is |received|
|00000e00| 2e 0d 09 0d 09 43 75 72 | 72 65 6e 74 6c 79 2c 20 |.....Cur|rently, |
|00000e10| 61 6c 6c 20 69 74 20 64 | 6f 65 73 20 69 73 20 73 |all it d|oes is s|
|00000e20| 65 74 20 74 68 65 20 67 | 4f 41 70 70 65 64 20 66 |et the g|OApped f|
|00000e30| 6c 61 67 2c 20 73 6f 20 | 79 6f 75 20 6b 6e 6f 77 |lag, so |you know|
|00000e40| 20 74 68 61 74 0d 09 79 | 6f 75 20 77 65 72 65 20 | that..y|ou were |
|00000e50| 63 61 6c 6c 65 64 20 69 | 6e 69 74 61 6c 6c 79 20 |called i|nitally |
|00000e60| 77 69 74 68 20 6e 6f 20 | 64 6f 63 73 2c 20 61 6e |with no |docs, an|
|00000e70| 64 20 74 68 65 72 65 66 | 6f 72 65 20 79 6f 75 20 |d theref|ore you |
|00000e80| 73 68 6f 75 6c 64 6e 27 | 74 20 0d 09 71 75 69 74 |shouldn'|t ..quit|
|00000e90| 20 77 68 65 6e 20 64 6f | 6e 65 20 70 72 6f 63 65 | when do|ne proce|
|00000ea0| 73 73 69 6e 67 20 61 6e | 79 20 66 6f 6c 6c 6f 77 |ssing an|y follow|
|00000eb0| 69 6e 67 20 6f 64 6f 63 | 73 2e 0d 2a 2f 0d 0d 70 |ing odoc|s..*/..p|
|00000ec0| 61 73 63 61 6c 20 76 6f | 69 64 20 4f 70 65 6e 41 |ascal vo|id OpenA|
|00000ed0| 70 70 20 28 76 6f 69 64 | 29 20 7b 0d 09 67 4f 41 |pp (void|) {..gOA|
|00000ee0| 70 70 65 64 20 3d 20 74 | 72 75 65 3b 0d 7d 0d 0d |pped = t|rue;.}..|
|00000ef0| 0d 2f 2a 09 0d 09 54 68 | 69 73 20 72 6f 75 74 69 |./*...Th|is routi|
|00000f00| 6e 65 20 69 73 20 63 61 | 6c 6c 65 64 20 77 68 65 |ne is ca|lled whe|
|00000f10| 6e 20 61 6e 20 51 55 49 | 54 20 65 76 65 6e 74 20 |n an QUI|T event |
|00000f20| 69 73 20 72 65 63 65 69 | 76 65 64 2e 0d 09 0d 09 |is recei|ved.....|
|00000f30| 57 65 20 73 69 6d 70 6c | 79 20 73 65 74 20 74 68 |We simpl|y set th|
|00000f40| 65 20 67 6c 6f 62 61 6c | 20 64 6f 6e 65 20 66 6c |e global| done fl|
|00000f50| 61 67 20 73 6f 20 74 68 | 61 74 20 74 68 65 20 6d |ag so th|at the m|
|00000f60| 61 69 6e 20 65 76 65 6e | 74 20 6c 6f 6f 70 20 63 |ain even|t loop c|
|00000f70| 61 6e 0d 09 67 72 61 63 | 65 66 75 6c 6c 79 20 65 |an..grac|efully e|
|00000f80| 78 69 74 2e 20 20 57 65 | 20 44 4f 20 4e 4f 54 20 |xit. We| DO NOT |
|00000f90| 63 61 6c 6c 20 45 78 69 | 74 54 6f 53 68 65 6c 6c |call Exi|tToShell|
|00000fa0| 20 66 6f 72 20 74 77 6f | 20 72 65 61 73 6f 6e 73 | for two| reasons|
|00000fb0| 3a 0d 09 31 29 20 49 74 | 20 69 73 20 61 20 70 72 |:..1) It| is a pr|
|00000fc0| 65 74 74 79 20 75 67 6c | 79 20 74 68 69 6e 67 20 |etty ugl|y thing |
|00000fd0| 74 6f 20 64 6f 2c 20 62 | 75 74 20 6d 6f 72 65 20 |to do, b|ut more |
|00000fe0| 69 6d 70 6f 72 74 61 6e | 74 6c 79 0d 09 32 29 20 |importan|tly..2) |
|00000ff0| 54 68 65 20 41 70 70 6c | 65 20 65 76 65 6e 74 20 |The Appl|e event |
|00001000| 6d 61 6e 61 67 65 72 20 | 77 69 6c 6c 20 67 65 74 |manager |will get|
|00001010| 20 52 45 41 4c 20 75 70 | 73 65 74 21 0d 2a 2f 0d | REAL up|set!.*/.|
|00001020| 0d 70 61 73 63 61 6c 20 | 76 6f 69 64 20 51 75 69 |.pascal |void Qui|
|00001030| 74 41 70 70 20 28 76 6f | 69 64 29 20 7b 0d 09 67 |tApp (vo|id) {..g|
|00001040| 44 6f 6e 65 20 3d 20 74 | 72 75 65 3b 09 2f 2a 09 |Done = t|rue;./*.|
|00001050| 41 6c 6c 20 44 6f 6e 65 | 21 20 2a 2f 0d 7d 0d 0d |All Done|! */.}..|
|00001060| 0d 2f 2a 09 0d 09 54 68 | 69 73 20 72 6f 75 74 69 |./*...Th|is routi|
|00001070| 6e 65 20 69 73 20 74 68 | 65 20 66 69 72 73 74 20 |ne is th|e first |
|00001080| 6f 6e 65 20 63 61 6c 6c | 65 64 20 77 68 65 6e 20 |one call|ed when |
|00001090| 61 6e 20 4f 44 4f 43 20 | 6f 72 20 50 44 4f 43 20 |an ODOC |or PDOC |
|000010a0| 65 76 65 6e 74 20 69 73 | 20 72 65 63 65 69 76 65 |event is| receive|
|000010b0| 64 2e 0d 09 0d 09 49 6e | 20 74 68 69 73 20 72 6f |d.....In| this ro|
|000010c0| 75 74 69 6e 65 20 79 6f | 75 20 77 6f 75 6c 64 20 |utine yo|u would |
|000010d0| 70 6c 61 63 65 20 63 6f | 64 65 20 75 73 65 64 20 |place co|de used |
|000010e0| 74 6f 20 73 65 74 75 70 | 20 73 74 72 75 63 74 75 |to setup| structu|
|000010f0| 72 65 73 2c 20 65 74 63 | 2e 20 0d 09 77 68 69 63 |res, etc|. ..whic|
|00001100| 68 20 77 6f 75 6c 64 20 | 62 65 20 75 73 65 64 20 |h would |be used |
|00001110| 69 6e 20 61 20 27 66 6f | 72 20 61 6c 6c 20 64 6f |in a 'fo|r all do|
|00001120| 63 73 27 20 73 69 74 75 | 61 74 69 6f 6e 20 28 6c |cs' situ|ation (l|
|00001130| 69 6b 65 20 22 41 72 63 | 68 69 76 65 20 61 6c 6c |ike "Arc|hive all|
|00001140| 0d 09 64 72 6f 70 70 65 | 64 20 66 69 6c 65 73 22 |..droppe|d files"|
|00001150| 29 0d 0d 09 4f 62 76 69 | 6f 75 73 6c 79 2c 20 74 |)...Obvi|ously, t|
|00001160| 68 65 20 6f 70 65 6e 69 | 6e 67 20 62 6f 6f 6c 65 |he openi|ng boole|
|00001170| 61 6e 20 74 65 6c 6c 73 | 20 79 6f 75 20 77 68 65 |an tells| you whe|
|00001180| 74 68 65 72 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |ther you| should |
|00001190| 62 65 20 6f 70 65 6e 69 | 6e 67 0d 09 6f 72 20 70 |be openi|ng..or p|
|000011a0| 72 69 6e 74 69 6e 67 20 | 74 68 65 73 65 20 66 69 |rinting |these fi|
|000011b0| 6c 65 73 20 62 61 73 65 | 64 20 6f 6e 20 74 68 65 |les base|d on the|
|000011c0| 20 74 79 70 65 20 6f 66 | 20 65 76 65 6e 74 20 72 | type of| event r|
|000011d0| 65 63 69 65 76 65 64 2e | 0d 09 0d 09 4e 45 57 20 |ecieved.|....NEW |
|000011e0| 49 4e 20 32 2e 30 21 0d | 09 54 68 65 20 69 74 65 |IN 2.0!.|.The ite|
|000011f0| 6d 43 6f 75 6e 74 20 70 | 61 72 61 6d 65 74 65 72 |mCount p|arameter|
|00001200| 20 69 73 20 73 69 6d 70 | 6c 79 20 74 68 65 20 6e | is simp|ly the n|
|00001210| 75 6d 62 65 72 20 6f 66 | 20 69 74 65 6d 73 20 74 |umber of| items t|
|00001220| 68 61 74 20 77 65 72 65 | 20 64 72 6f 70 70 65 64 |hat were| dropped|
|00001230| 20 6f 6e 0d 09 74 68 65 | 20 61 70 70 6c 69 63 61 | on..the| applica|
|00001240| 74 69 6f 6e 20 61 6e 64 | 20 74 68 61 74 20 79 6f |tion and| that yo|
|00001250| 75 20 77 69 6c 6c 20 62 | 65 20 70 72 6f 63 65 73 |u will b|e proces|
|00001260| 73 69 6e 67 2e 20 20 54 | 68 69 73 20 67 69 76 65 |sing. T|his give|
|00001270| 73 20 79 6f 75 20 74 68 | 65 20 61 62 69 6c 69 74 |s you th|e abilit|
|00001280| 79 0d 09 74 6f 20 64 6f | 20 61 20 73 69 6e 67 6c |y..to do| a singl|
|00001290| 65 20 70 72 65 66 6c 69 | 67 68 74 20 66 6f 72 20 |e prefli|ght for |
|000012a0| 6d 65 6d 6f 72 79 20 61 | 6c 6c 6f 63 61 74 69 6f |memory a|llocatio|
|000012b0| 6e 20 6e 65 65 64 73 2c | 20 72 61 74 68 65 72 20 |n needs,| rather |
|000012c0| 74 68 61 6e 20 64 6f 69 | 6e 67 20 69 74 0d 09 6f |than doi|ng it..o|
|000012d0| 6e 63 65 20 66 6f 72 20 | 65 61 63 68 20 69 74 65 |nce for |each ite|
|000012e0| 6d 20 61 73 20 69 6e 20 | 70 72 65 76 69 6f 75 73 |m as in |previous|
|000012f0| 20 76 65 72 73 69 6f 6e | 73 2e 0d 09 0d 09 75 73 | version|s.....us|
|00001300| 65 72 44 61 74 61 48 61 | 6e 64 6c 65 20 69 73 20 |erDataHa|ndle is |
|00001310| 61 20 68 61 6e 64 6c 65 | 20 74 68 61 74 20 79 6f |a handle| that yo|
|00001320| 75 20 63 61 6e 20 63 72 | 65 61 74 65 20 26 20 75 |u can cr|eate & u|
|00001330| 73 65 20 74 6f 20 73 74 | 6f 72 65 20 79 6f 75 72 |se to st|ore your|
|00001340| 20 6f 77 6e 0d 09 64 61 | 74 61 20 73 74 72 75 63 | own..da|ta struc|
|00001350| 74 73 2e 20 20 54 68 69 | 73 20 64 61 74 61 48 61 |ts. Thi|s dataHa|
|00001360| 6e 64 6c 65 20 77 69 6c | 6c 20 62 65 20 70 61 73 |ndle wil|l be pas|
|00001370| 73 65 64 20 61 72 6f 75 | 6e 64 20 74 6f 20 74 68 |sed arou|nd to th|
|00001380| 65 20 6f 74 68 65 72 20 | 0d 09 6f 64 6f 63 2f 70 |e other |..odoc/p|
|00001390| 64 6f 63 20 72 6f 75 74 | 69 6e 65 73 20 73 6f 20 |doc rout|ines so |
|000013a0| 74 68 61 74 20 79 6f 75 | 20 63 61 6e 20 67 65 74 |that you| can get|
|000013b0| 20 61 74 20 79 6f 75 72 | 20 64 61 74 61 20 77 69 | at your| data wi|
|000013c0| 74 68 6f 75 74 20 75 73 | 69 6e 67 0d 09 67 6c 6f |thout us|ing..glo|
|000013d0| 62 61 6c 73 20 2d 20 6a | 75 73 74 20 6c 69 6b 65 |bals - j|ust like|
|000013e0| 20 74 68 65 20 6e 65 77 | 20 53 74 61 6e 64 61 72 | the new| Standar|
|000013f0| 64 46 69 6c 65 2e 20 20 | 0d 09 0d 09 57 65 20 61 |dFile. |....We a|
|00001400| 6c 73 6f 20 72 65 74 75 | 72 6e 20 61 20 62 6f 6f |lso retu|rn a boo|
|00001410| 6c 65 61 6e 20 74 6f 20 | 74 65 6c 6c 20 74 68 65 |lean to |tell the|
|00001420| 20 63 61 6c 6c 65 72 20 | 69 66 20 79 6f 75 20 73 | caller |if you s|
|00001430| 75 70 70 6f 72 74 20 74 | 68 69 73 20 74 79 70 65 |upport t|his type|
|00001440| 0d 09 6f 66 20 65 76 65 | 6e 74 2e 20 20 42 79 20 |..of eve|nt. By |
|00001450| 64 65 66 61 75 6c 74 2c | 20 6f 75 72 20 64 72 6f |default,| our dro|
|00001460| 70 62 6f 78 65 73 20 64 | 6f 6e 27 74 20 73 75 70 |pboxes d|on't sup|
|00001470| 70 6f 72 74 20 74 68 65 | 20 70 64 6f 63 2c 20 73 |port the| pdoc, s|
|00001480| 6f 20 77 68 65 6e 0d 09 | 6f 70 65 6e 69 6e 67 20 |o when..|opening |
|00001490| 69 73 20 46 41 4c 53 45 | 2c 20 77 65 20 72 65 74 |is FALSE|, we ret|
|000014a0| 75 72 6e 20 46 41 4c 53 | 45 20 74 6f 20 6c 65 74 |urn FALS|E to let|
|000014b0| 20 74 68 65 20 63 61 6c | 6c 65 72 20 73 65 6e 64 | the cal|ler send|
|000014c0| 20 62 61 63 6b 20 74 68 | 65 0d 09 70 72 6f 70 65 | back th|e..prope|
|000014d0| 72 20 65 72 72 6f 72 20 | 63 6f 64 65 20 74 6f 20 |r error |code to |
|000014e0| 74 68 65 20 41 45 4d 61 | 6e 61 67 65 72 2e 0d 2a |the AEMa|nager..*|
|000014f0| 2f 0d 0d 70 61 73 63 61 | 6c 20 42 6f 6f 6c 65 61 |/..pasca|l Boolea|
|00001500| 6e 20 50 72 65 46 6c 69 | 67 68 74 44 6f 63 73 20 |n PreFli|ghtDocs |
|00001510| 28 42 6f 6f 6c 65 61 6e | 20 6f 70 65 6e 69 6e 67 |(Boolean| opening|
|00001520| 2c 20 73 68 6f 72 74 20 | 69 74 65 6d 43 6f 75 6e |, short |itemCoun|
|00001530| 74 2c 20 48 61 6e 64 6c | 65 20 2a 75 73 65 72 44 |t, Handl|e *userD|
|00001540| 61 74 61 48 61 6e 64 6c | 65 29 20 7b 0d 0d 09 75 |ataHandl|e) {...u|
|00001550| 6e 73 69 67 6e 65 64 20 | 69 6e 74 20 69 6e 64 65 |nsigned |int inde|
|00001560| 78 3b 0d 0d 09 69 66 20 | 28 28 6f 70 65 6e 69 6e |x;...if |((openin|
|00001570| 67 29 20 26 26 20 28 69 | 74 65 6d 43 6f 75 6e 74 |g) && (i|temCount|
|00001580| 20 3e 20 30 29 29 20 7b | 09 2f 2a 20 44 6f 6e 27 | > 0)) {|./* Don'|
|00001590| 74 20 73 75 70 70 6f 72 | 74 20 70 72 69 6e 74 69 |t suppor|t printi|
|000015a0| 6e 67 2c 20 73 6f 20 64 | 6f 6e 27 74 20 77 61 73 |ng, so d|on't was|
|000015b0| 74 65 20 6f 75 72 20 74 | 69 6d 65 20 2a 2f 0d 0d |te our t|ime */..|
|000015c0| 09 09 2f 2a 0d 09 09 2a | 2a 20 54 68 65 20 66 6f |../*...*|* The fo|
|000015d0| 6c 6c 6f 77 69 6e 67 20 | 69 73 20 61 20 62 75 67 |llowing |is a bug|
|000015e0| 2c 20 69 74 20 69 73 20 | 74 68 65 20 72 65 73 70 |, it is |the resp|
|000015f0| 6f 6e 73 69 62 69 6c 69 | 74 79 20 6f 66 20 50 72 |onsibili|ty of Pr|
|00001600| 6f 63 65 73 73 49 74 65 | 6d 20 74 6f 20 69 6e 63 |ocessIte|m to inc|
|00001610| 72 65 6d 65 6e 74 20 67 | 5f 61 72 67 63 0d 09 09 |rement g|_argc...|
|00001620| 2a 2a 20 67 5f 61 72 67 | 63 20 2b 3d 20 69 74 65 |** g_arg|c += ite|
|00001630| 6d 43 6f 75 6e 74 3b 0d | 09 09 2a 2f 0d 0d 09 09 |mCount;.|..*/....|
|00001640| 41 6c 6c 6f 63 61 74 65 | 41 70 70 4e 61 6d 65 73 |Allocate|AppNames|
|00001650| 28 75 73 65 72 44 61 74 | 61 48 61 6e 64 6c 65 2c |(userDat|aHandle,|
|00001660| 20 69 74 65 6d 43 6f 75 | 6e 74 29 3b 0d 09 09 53 | itemCou|nt);...S|
|00001670| 65 74 41 70 70 6c 69 63 | 61 74 69 6f 6e 4e 61 6d |etApplic|ationNam|
|00001680| 65 28 2a 75 73 65 72 44 | 61 74 61 48 61 6e 64 6c |e(*userD|ataHandl|
|00001690| 65 29 3b 0d 09 7d 0d 0d | 09 72 65 74 75 72 6e 20 |e);..}..|.return |
|000016a0| 6f 70 65 6e 69 6e 67 3b | 09 09 2f 2f 20 77 65 20 |opening;|..// we |
|000016b0| 73 75 70 70 6f 72 74 20 | 6f 70 65 6e 69 6e 67 2c |support |opening,|
|000016c0| 20 62 75 74 20 6e 6f 74 | 20 70 72 69 6e 74 69 6e | but not| printin|
|000016d0| 67 20 2d 20 73 65 65 20 | 61 62 6f 76 65 0d 7d 0d |g - see |above.}.|
|000016e0| 0d 2f 2a 09 0d 09 54 68 | 69 73 20 72 6f 75 74 69 |./*...Th|is routi|
|000016f0| 6e 65 20 69 73 20 63 61 | 6c 6c 65 64 20 66 6f 72 |ne is ca|lled for|
|00001700| 20 65 61 63 68 20 66 69 | 6c 65 20 70 61 73 73 65 | each fi|le passe|
|00001710| 64 20 69 6e 20 74 68 65 | 20 4f 44 4f 43 20 65 76 |d in the| ODOC ev|
|00001720| 65 6e 74 2e 0d 09 0d 09 | 49 6e 20 74 68 69 73 20 |ent.....|In this |
|00001730| 72 6f 75 74 69 6e 65 20 | 79 6f 75 20 77 6f 75 6c |routine |you woul|
|00001740| 64 20 70 6c 61 63 65 20 | 63 6f 64 65 20 66 6f 72 |d place |code for|
|00001750| 20 70 72 6f 63 65 73 73 | 69 6e 67 20 65 61 63 68 | process|ing each|
|00001760| 20 66 69 6c 65 2f 66 6f | 6c 64 65 72 2f 64 69 73 | file/fo|lder/dis|
|00001770| 6b 20 74 68 61 74 0d 09 | 77 61 73 20 64 72 6f 70 |k that..|was drop|
|00001780| 70 65 64 20 6f 6e 20 74 | 6f 70 20 6f 66 20 79 6f |ped on t|op of yo|
|00001790| 75 2e 0d 2a 2f 0d 0d 70 | 61 73 63 61 6c 20 76 6f |u..*/..p|ascal vo|
|000017a0| 69 64 20 4f 70 65 6e 44 | 6f 63 20 28 20 46 53 53 |id OpenD|oc ( FSS|
|000017b0| 70 65 63 50 74 72 20 6d | 79 46 53 53 50 74 72 2c |pecPtr m|yFSSPtr,|
|000017c0| 20 42 6f 6f 6c 65 61 6e | 20 6f 70 65 6e 69 6e 67 | Boolean| opening|
|000017d0| 2c 20 48 61 6e 64 6c 65 | 20 75 73 65 72 44 61 74 |, Handle| userDat|
|000017e0| 61 48 61 6e 64 6c 65 20 | 29 20 7b 0d 0d 09 4f 53 |aHandle |) {...OS|
|000017f0| 45 72 72 09 65 72 72 20 | 3d 20 6e 6f 45 72 72 3b |Err.err |= noErr;|
|00001800| 0d 09 0d 09 23 69 66 64 | 65 66 20 71 57 61 6c 6b |....#ifd|ef qWalk|
|00001810| 46 6f 6c 64 65 72 73 0d | 09 09 2f 2a 0d 09 09 09 |Folders.|../*....|
|00001820| 46 6f 72 20 74 68 69 73 | 20 63 61 73 65 20 77 65 |For this| case we|
|00001830| 20 6e 65 65 64 20 74 6f | 20 64 65 74 65 72 6d 69 | need to| determi|
|00001840| 6e 65 20 69 66 20 74 68 | 65 20 46 53 53 70 65 63 |ne if th|e FSSpec|
|00001850| 20 69 73 20 61 20 66 69 | 6c 65 20 6f 72 20 66 6f | is a fi|le or fo|
|00001860| 6c 64 65 72 2e 0d 09 09 | 09 49 66 20 69 74 27 73 |lder....|.If it's|
|00001870| 20 61 20 66 6f 6c 64 65 | 72 2c 20 77 65 20 74 68 | a folde|r, we th|
|00001880| 65 6e 20 6e 65 65 64 20 | 74 6f 20 70 72 6f 63 65 |en need |to proce|
|00001890| 73 73 20 65 61 63 68 20 | 69 74 65 6d 20 69 6e 20 |ss each |item in |
|000018a0| 74 68 61 74 20 66 6f 6c | 64 65 72 2c 0d 09 09 09 |that fol|der,....|
|000018b0| 6f 74 68 65 72 77 69 73 | 65 20 6a 75 73 74 20 70 |otherwis|e just p|
|000018c0| 72 6f 63 65 73 73 20 74 | 68 65 20 69 74 65 6d 2e |rocess t|he item.|
|000018d0| 0d 09 09 2a 2f 0d 09 09 | 69 66 20 28 46 53 70 49 |...*/...|if (FSpI|
|000018e0| 73 46 6f 6c 64 65 72 28 | 6d 79 46 53 53 50 74 72 |sFolder(|myFSSPtr|
|000018f0| 29 29 0d 09 09 09 65 72 | 72 20 3d 20 50 72 6f 63 |))....er|r = Proc|
|00001900| 65 73 73 46 6f 6c 64 65 | 72 28 6d 79 46 53 53 50 |essFolde|r(myFSSP|
|00001910| 74 72 2c 20 75 73 65 72 | 44 61 74 61 48 61 6e 64 |tr, user|DataHand|
|00001920| 6c 65 29 3b 0d 09 09 65 | 6c 73 65 0d 09 09 09 65 |le);...e|lse....e|
|00001930| 72 72 20 3d 20 50 72 6f | 63 65 73 73 49 74 65 6d |rr = Pro|cessItem|
|00001940| 28 6d 79 46 53 53 50 74 | 72 2c 20 75 73 65 72 44 |(myFSSPt|r, userD|
|00001950| 61 74 61 48 61 6e 64 6c | 65 29 3b 0d 09 23 65 6c |ataHandl|e);..#el|
|00001960| 73 65 0d 09 09 2f 2a 0d | 09 09 09 46 6f 72 20 74 |se.../*.|...For t|
|00001970| 68 69 73 20 63 61 73 65 | 20 77 65 20 6a 75 73 74 |his case| we just|
|00001980| 20 63 61 6c 6c 20 50 72 | 6f 63 65 73 73 49 74 65 | call Pr|ocessIte|
|00001990| 6d 20 6f 6e 20 74 68 65 | 20 46 53 53 70 65 63 20 |m on the| FSSpec |
|000019a0| 61 62 6f 76 65 2e 0d 09 | 09 2a 2f 0d 09 09 65 72 |above...|.*/...er|
|000019b0| 72 20 3d 20 50 72 6f 63 | 65 73 73 49 74 65 6d 28 |r = Proc|essItem(|
|000019c0| 6d 79 46 53 53 50 74 72 | 2c 20 75 73 65 72 44 61 |myFSSPtr|, userDa|
|000019d0| 74 61 48 61 6e 64 6c 65 | 29 3b 0d 09 23 65 6e 64 |taHandle|);..#end|
|000019e0| 69 66 0d 09 0d 09 2f 2f | 20 79 6f 75 20 73 68 6f |if....//| you sho|
|000019f0| 75 6c 64 20 70 72 6f 62 | 61 62 6c 79 20 64 6f 20 |uld prob|ably do |
|00001a00| 73 6f 6d 65 74 68 69 6e | 67 20 69 66 20 79 6f 75 |somethin|g if you|
|00001a10| 20 67 65 74 20 62 61 63 | 6b 20 61 6e 20 65 72 72 | get bac|k an err|
|00001a20| 6f 72 20 3b 29 0d 7d 0d | 0d 0d 2f 2a 09 0d 09 54 |or ;).}.|../*...T|
|00001a30| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 69 73 20 74 |his rout|ine is t|
|00001a40| 68 65 20 6c 61 73 74 20 | 72 6f 75 74 69 6e 65 20 |he last |routine |
|00001a50| 63 61 6c 6c 65 64 20 61 | 73 20 70 61 72 74 20 6f |called a|s part o|
|00001a60| 66 20 61 6e 20 4f 44 4f | 43 20 65 76 65 6e 74 2e |f an ODO|C event.|
|00001a70| 0d 09 0d 09 49 6e 20 74 | 68 69 73 20 72 6f 75 74 |....In t|his rout|
|00001a80| 69 6e 65 20 79 6f 75 20 | 77 6f 75 6c 64 20 70 6c |ine you |would pl|
|00001a90| 61 63 65 20 63 6f 64 65 | 20 74 6f 20 70 72 6f 63 |ace code| to proc|
|00001aa0| 65 73 73 20 61 6e 79 20 | 73 74 72 75 63 74 75 72 |ess any |structur|
|00001ab0| 65 73 2c 20 65 74 63 2e | 20 0d 09 74 68 61 74 20 |es, etc.| ..that |
|00001ac0| 79 6f 75 20 73 65 74 75 | 70 20 69 6e 20 74 68 65 |you setu|p in the|
|00001ad0| 20 50 72 65 66 6c 69 67 | 68 74 44 6f 63 73 20 72 | Preflig|htDocs r|
|00001ae0| 6f 75 74 69 6e 65 2e 0d | 0d 09 4e 45 57 20 49 4e |outine..|..NEW IN|
|00001af0| 20 32 2e 30 21 0d 09 54 | 68 65 20 69 74 65 6d 43 | 2.0!..T|he itemC|
|00001b00| 6f 75 6e 74 20 70 61 72 | 61 6d 65 74 65 72 20 77 |ount par|ameter w|
|00001b10| 61 73 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |as the n|umber of|
|00001b20| 20 69 74 65 6d 73 20 74 | 68 61 74 20 79 6f 75 20 | items t|hat you |
|00001b30| 70 72 6f 63 65 73 73 65 | 64 2e 0d 09 49 74 20 69 |processe|d...It i|
|00001b40| 73 20 70 61 73 73 65 64 | 20 68 65 72 65 20 6a 75 |s passed| here ju|
|00001b50| 73 74 20 69 6e 20 63 61 | 73 65 20 79 6f 75 20 6e |st in ca|se you n|
|00001b60| 65 65 64 20 69 74 20 3b | 29 20 20 0d 09 0d 09 49 |eed it ;|) ....I|
|00001b70| 66 20 79 6f 75 20 63 72 | 65 61 74 65 64 20 61 20 |f you cr|eated a |
|00001b80| 75 73 65 72 44 61 74 61 | 48 61 6e 64 6c 65 20 69 |userData|Handle i|
|00001b90| 6e 20 74 68 65 20 50 72 | 65 46 6c 69 67 68 74 44 |n the Pr|eFlightD|
|00001ba0| 6f 63 73 20 72 6f 75 74 | 69 6e 65 73 2c 20 74 68 |ocs rout|ines, th|
|00001bb0| 69 73 20 69 73 0d 09 74 | 68 65 20 70 6c 61 63 65 |is is..t|he place|
|00001bc0| 20 74 6f 20 64 69 73 70 | 6f 73 65 20 6f 66 20 69 | to disp|ose of i|
|00001bd0| 74 20 73 69 6e 63 65 20 | 74 68 65 20 53 68 65 6c |t since |the Shel|
|00001be0| 6c 20 77 69 6c 6c 20 4e | 4f 54 20 64 6f 20 69 74 |l will N|OT do it|
|00001bf0| 20 66 6f 72 20 79 6f 75 | 21 0d 2a 2f 0d 0d 70 61 | for you|!.*/..pa|
|00001c00| 73 63 61 6c 20 76 6f 69 | 64 20 50 6f 73 74 46 6c |scal voi|d PostFl|
|00001c10| 69 67 68 74 44 6f 63 73 | 20 28 20 42 6f 6f 6c 65 |ightDocs| ( Boole|
|00001c20| 61 6e 20 6f 70 65 6e 69 | 6e 67 2c 20 73 68 6f 72 |an openi|ng, shor|
|00001c30| 74 20 69 74 65 6d 43 6f | 75 6e 74 2c 20 48 61 6e |t itemCo|unt, Han|
|00001c40| 64 6c 65 20 75 73 65 72 | 44 61 74 61 48 61 6e 64 |dle user|DataHand|
|00001c50| 6c 65 20 29 20 7b 0d 0d | 09 69 6e 74 20 69 6e 64 |le ) {..|.int ind|
|00001c60| 65 78 3b 0d 09 69 6e 74 | 20 61 72 67 63 3b 0d 09 |ex;..int| argc;..|
|00001c70| 63 68 61 72 20 2a 2a 20 | 61 72 67 76 3b 0d 09 66 |char ** |argv;..f|
|00001c80| 69 6c 65 4e 61 6d 65 50 | 74 72 20 66 69 6c 65 4e |ileNameP|tr fileN|
|00001c90| 61 6d 65 73 3b 0d 09 0d | 09 65 78 74 65 72 6e 20 |ames;...|.extern |
|00001ca0| 69 6e 74 20 4d 61 69 6e | 28 69 6e 74 20 61 72 67 |int Main|(int arg|
|00001cb0| 63 2c 20 63 68 61 72 20 | 2a 2a 61 72 67 76 29 3b |c, char |**argv);|
|00001cc0| 0d 0d 09 2f 2a 0d 09 2a | 2a 20 4f 4b 2c 20 74 68 |.../*..*|* OK, th|
|00001cd0| 69 73 20 69 73 20 49 54 | 21 20 57 65 20 68 61 76 |is is IT|! We hav|
|00001ce0| 65 20 66 69 6e 61 6c 6c | 79 20 70 72 6f 63 65 73 |e finall|y proces|
|00001cf0| 73 65 64 20 61 6c 6c 20 | 74 68 65 20 66 69 6c 65 |sed all |the file|
|00001d00| 73 2c 20 6e 6f 77 20 77 | 65 20 73 65 6e 64 20 74 |s, now w|e send t|
|00001d10| 68 65 0d 09 2a 2a 20 70 | 61 74 68 6e 61 6d 65 73 |he..** p|athnames|
|00001d20| 20 26 20 63 6f 75 6e 74 | 20 6f 66 66 20 74 6f 20 | & count| off to |
|00001d30| 74 68 65 20 52 45 41 4c | 20 75 6e 69 78 20 66 75 |the REAL| unix fu|
|00001d40| 6e 63 74 69 6f 6e 2e 2e | 2e 0d 09 2a 2f 0d 09 48 |nction..|...*/..H|
|00001d50| 4c 6f 63 6b 28 75 73 65 | 72 44 61 74 61 48 61 6e |Lock(use|rDataHan|
|00001d60| 64 6c 65 29 3b 0d 09 09 | 66 69 6c 65 4e 61 6d 65 |dle);...|fileName|
|00001d70| 73 20 3d 20 2a 28 28 66 | 69 6c 65 4e 61 6d 65 48 |s = *((f|ileNameH|
|00001d80| 61 6e 64 6c 65 29 20 75 | 73 65 72 44 61 74 61 48 |andle) u|serDataH|
|00001d90| 61 6e 64 6c 65 29 3b 0d | 09 09 61 72 67 63 20 3d |andle);.|..argc =|
|00001da0| 20 66 69 6c 65 4e 61 6d | 65 73 2d 3e 63 6f 75 6e | fileNam|es->coun|
|00001db0| 74 3b 0d 09 09 61 72 67 | 76 20 3d 20 66 69 6c 65 |t;...arg|v = file|
|00001dc0| 4e 61 6d 65 73 2d 3e 6e | 61 6d 65 73 3b 0d 0d 09 |Names->n|ames;...|
|00001dd0| 09 28 76 6f 69 64 29 20 | 4d 61 69 6e 28 61 72 67 |.(void) |Main(arg|
|00001de0| 63 2c 20 61 72 67 76 29 | 3b 0d 09 48 55 6e 6c 6f |c, argv)|;..HUnlo|
|00001df0| 63 6b 28 75 73 65 72 44 | 61 74 61 48 61 6e 64 6c |ck(userD|ataHandl|
|00001e00| 65 29 3b 0d 09 2f 2a 0d | 09 2a 2a 20 4e 6f 77 20 |e);../*.|.** Now |
|00001e10| 64 65 61 6c 6c 6f 63 61 | 74 65 20 74 68 65 20 6d |dealloca|te the m|
|00001e20| 65 6d 6f 72 79 20 73 74 | 6f 72 65 64 20 62 79 20 |emory st|ored by |
|00001e30| 50 72 65 46 6c 69 67 68 | 74 44 6f 63 73 0d 09 2a |PreFligh|tDocs..*|
|00001e40| 2f 0d 09 0d 09 44 65 61 | 6c 6c 6f 63 61 74 65 41 |/....Dea|llocateA|
|00001e50| 70 70 4e 61 6d 65 73 28 | 75 73 65 72 44 61 74 61 |ppNames(|userData|
|00001e60| 48 61 6e 64 6c 65 29 3b | 0d 09 0d 09 2f 2a 0d 09 |Handle);|..../*..|
|00001e70| 2a 2a 20 52 65 73 65 74 | 20 74 68 65 20 67 6c 6f |** Reset| the glo|
|00001e80| 62 61 6c 73 2c 20 74 68 | 69 73 20 69 73 20 69 6e |bals, th|is is in|
|00001e90| 20 63 61 73 65 20 74 68 | 65 20 75 73 65 72 20 69 | case th|e user i|
|00001ea0| 6e 76 6f 6b 65 64 20 75 | 73 20 62 79 20 74 68 65 |nvoked u|s by the|
|00001eb0| 20 6d 65 6e 75 69 74 65 | 6d 2c 0d 09 2a 2a 20 74 | menuite|m,..** t|
|00001ec0| 68 65 20 75 73 65 72 20 | 5f 63 6f 75 6c 64 5f 20 |he user |_could_ |
|00001ed0| 72 75 6e 20 74 68 72 6f | 75 67 68 20 61 67 61 69 |run thro|ugh agai|
|00001ee0| 6e 20 69 66 20 77 61 6e | 74 65 64 2e 2e 2e 0d 09 |n if wan|ted.....|
|00001ef0| 2a 2f 0d 09 0d 09 23 69 | 66 64 65 66 20 54 48 49 |*/....#i|fdef THI|
|00001f00| 4e 4b 5f 43 0d 09 2f 2a | 0d 09 2a 2a 20 55 6e 68 |NK_C../*|..** Unh|
|00001f10| 69 6c 69 74 65 20 74 68 | 65 20 73 74 75 70 69 64 |ilite th|e stupid|
|00001f20| 20 54 48 49 4e 4b 20 43 | 20 63 6f 6e 73 6f 6c 65 | THINK C| console|
|00001f30| 2c 20 73 6f 20 77 65 20 | 67 65 74 20 6b 65 79 70 |, so we |get keyp|
|00001f40| 72 65 73 73 65 73 2e 0d | 09 2a 2a 20 54 68 69 73 |resses..|.** This|
|00001f50| 20 6d 61 79 20 6e 6f 74 | 20 62 65 20 6e 65 63 65 | may not| be nece|
|00001f60| 73 73 61 72 79 20 69 66 | 20 79 6f 75 20 68 61 76 |ssary if| you hav|
|00001f70| 65 20 61 6e 20 75 70 2d | 74 6f 2d 64 61 74 65 20 |e an up-|to-date |
|00001f80| 28 38 2e 30 20 6f 72 0d | 09 2a 2a 20 70 61 69 64 |(8.0 or.|.** paid|
|00001f90| 2d 66 6f 72 20 37 2e 30 | 29 20 41 4e 53 49 2f 63 |-for 7.0|) ANSI/c|
|00001fa0| 6f 6e 73 6f 6c 65 20 6c | 69 62 72 61 72 79 2e 20 |onsole l|ibrary. |
|00001fb0| 20 4f 72 20 69 74 20 6d | 69 67 68 74 2c 20 77 68 | Or it m|ight, wh|
|00001fc0| 6f 20 6b 6e 6f 77 73 3f | 0d 09 2a 2f 0d 09 53 65 |o knows?|..*/..Se|
|00001fd0| 6c 65 63 74 57 69 6e 64 | 6f 77 28 20 67 53 70 6c |lectWind|ow( gSpl|
|00001fe0| 61 73 68 53 63 72 65 65 | 6e 20 29 3b 0d 09 23 65 |ashScree|n );..#e|
|00001ff0| 6e 64 69 66 0d 0d 09 69 | 66 20 28 20 28 6f 70 65 |ndif...i|f ( (ope|
|00002000| 6e 69 6e 67 29 20 26 26 | 20 28 21 67 4f 41 70 70 |ning) &&| (!gOApp|
|00002010| 65 64 29 20 29 0d 09 09 | 67 44 6f 6e 65 20 3d 20 |ed) )...|gDone = |
|00002020| 74 72 75 65 3b 09 2f 2f | 09 63 6c 6f 73 65 20 65 |true;.//|.close e|
|00002030| 76 65 72 79 74 68 69 6e | 67 20 75 70 21 0d 0d 09 |verythin|g up!...|
|00002040| 2f 2a 0d 09 09 54 68 65 | 20 72 65 61 73 6f 6e 20 |/*...The| reason |
|00002050| 77 65 20 64 6f 20 6e 6f | 74 20 61 75 74 6f 20 71 |we do no|t auto q|
|00002060| 75 69 74 20 69 73 20 62 | 61 73 65 64 20 6f 6e 20 |uit is b|ased on |
|00002070| 61 20 72 65 63 6f 6d 6d | 65 6e 64 61 74 69 6f 6e |a recomm|endation|
|00002080| 20 69 6e 20 74 68 65 0d | 09 09 41 70 70 6c 65 20 | in the.|..Apple |
|00002090| 65 76 65 6e 74 20 52 65 | 67 69 73 74 72 79 20 77 |event Re|gistry w|
|000020a0| 68 69 63 68 20 73 70 65 | 63 69 66 69 63 61 6c 6c |hich spe|cificall|
|000020b0| 79 20 73 74 61 74 65 73 | 20 74 68 61 74 20 79 6f |y states| that yo|
|000020c0| 75 20 73 68 6f 75 6c 64 | 20 4e 4f 54 0d 09 09 71 |u should| NOT...q|
|000020d0| 75 69 74 20 6f 6e 20 61 | 20 27 70 64 6f 63 27 20 |uit on a| 'pdoc' |
|000020e0| 61 73 20 74 68 65 20 46 | 69 6e 64 65 72 20 77 69 |as the F|inder wi|
|000020f0| 6c 6c 20 73 65 6e 64 20 | 79 6f 75 20 61 20 27 71 |ll send |you a 'q|
|00002100| 75 69 74 27 20 77 68 65 | 6e 20 69 74 20 69 73 20 |uit' whe|n it is |
|00002110| 0d 09 09 72 65 61 64 79 | 20 66 6f 72 20 79 6f 75 |...ready| for you|
|00002120| 20 74 6f 20 64 6f 20 73 | 6f 2e 0d 09 2a 2f 0d 7d | to do s|o...*/.}|
|00002130| 0d 0d 2f 2a 0d 09 54 68 | 69 73 20 72 6f 75 74 69 |../*..Th|is routi|
|00002140| 6e 65 20 67 65 74 73 20 | 63 61 6c 6c 65 64 20 66 |ne gets |called f|
|00002150| 6f 72 20 61 6e 79 20 66 | 6f 6c 64 65 72 20 28 6f |or any f|older (o|
|00002160| 72 20 64 69 73 6b 29 20 | 74 68 61 74 20 74 68 65 |r disk) |that the|
|00002170| 20 63 61 6c 6c 65 72 20 | 77 61 6e 74 73 20 0d 09 | caller |wants ..|
|00002180| 70 72 6f 63 65 73 73 65 | 64 20 61 73 20 61 20 73 |processe|d as a s|
|00002190| 65 74 20 6f 66 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |et of co|mponent |
|000021a0| 69 74 65 6d 73 2c 20 69 | 6e 73 74 65 61 64 20 6f |items, i|nstead o|
|000021b0| 66 20 61 73 20 61 20 73 | 69 6e 67 6c 65 20 65 6e |f as a s|ingle en|
|000021c0| 74 69 74 79 2e 0d 09 54 | 68 65 20 64 65 74 65 72 |tity...T|he deter|
|000021d0| 6d 69 6e 69 6e 67 20 66 | 61 63 74 6f 72 20 69 73 |mining f|actor is|
|000021e0| 20 74 68 65 20 64 65 66 | 69 6e 69 74 69 6f 6e 20 | the def|inition |
|000021f0| 6f 66 20 74 68 65 20 71 | 57 61 6c 6b 46 6f 6c 64 |of the q|WalkFold|
|00002200| 65 72 20 63 6f 6d 70 69 | 6c 65 72 20 64 69 72 65 |er compi|ler dire|
|00002210| 63 74 69 76 65 2e 0d 2a | 2f 0d 73 74 61 74 69 63 |ctive..*|/.static|
|00002220| 20 4f 53 45 72 72 20 50 | 72 6f 63 65 73 73 46 6f | OSErr P|rocessFo|
|00002230| 6c 64 65 72 28 46 53 53 | 70 65 63 50 74 72 20 6d |lder(FSS|pecPtr m|
|00002240| 79 46 53 53 50 74 72 2c | 20 48 61 6e 64 6c 65 20 |yFSSPtr,| Handle |
|00002250| 75 73 65 72 44 61 74 61 | 48 61 6e 64 6c 65 29 0d |userData|Handle).|
|00002260| 7b 0d 09 4f 53 45 72 72 | 09 09 65 72 72 20 3d 20 |{..OSErr|..err = |
|00002270| 6e 6f 45 72 72 3b 0d 09 | 73 68 6f 72 74 09 09 69 |noErr;..|short..i|
|00002280| 6e 64 65 78 2c 20 6f 6c | 64 49 6e 64 65 78 2c 20 |ndex, ol|dIndex, |
|00002290| 6c 6f 63 61 6c 49 6e 64 | 65 78 3b 0d 09 46 53 53 |localInd|ex;..FSS|
|000022a0| 70 65 63 09 09 6c 6f 63 | 61 6c 46 53 53 70 65 63 |pec..loc|alFSSpec|
|000022b0| 2c 20 63 75 72 46 53 53 | 70 65 63 3b 0d 09 43 49 |, curFSS|pec;..CI|
|000022c0| 6e 66 6f 50 42 52 65 63 | 09 63 69 70 62 3b 0d 09 |nfoPBRec|.cipb;..|
|000022d0| 53 74 72 32 35 35 09 09 | 66 4e 61 6d 65 2c 20 76 |Str255..|fName, v|
|000022e0| 46 4e 61 6d 65 3b 0d 09 | 6c 6f 6e 67 09 09 64 69 |FName;..|long..di|
|000022f0| 72 49 44 2c 20 6f 72 69 | 67 44 69 72 49 44 3b 0d |rID, ori|gDirID;.|
|00002300| 09 42 6f 6f 6c 65 61 6e | 09 09 66 6f 75 6e 64 50 |.Boolean|..foundP|
|00002310| 6f 73 69 74 69 6f 6e 3b | 0d 20 0d 20 09 2f 2f 20 |osition;|. . .// |
|00002320| 63 6f 70 79 20 74 68 65 | 20 73 6f 75 72 63 65 20 |copy the| source |
|00002330| 6c 6f 63 61 6c 6c 79 20 | 74 6f 20 61 76 6f 69 64 |locally |to avoid|
|00002340| 20 72 65 63 75 72 73 69 | 6f 6e 20 70 72 6f 62 6c | recursi|on probl|
|00002350| 65 6d 73 0d 20 09 42 6c | 6f 63 6b 4d 6f 76 65 44 |ems. .Bl|ockMoveD|
|00002360| 61 74 61 28 6d 79 46 53 | 53 50 74 72 2c 20 26 6c |ata(myFS|SPtr, &l|
|00002370| 6f 63 61 6c 46 53 53 70 | 65 63 2c 20 73 69 7a 65 |ocalFSSp|ec, size|
|00002380| 6f 66 28 46 53 53 70 65 | 63 29 29 3b 0d 20 09 0d |of(FSSpe|c));. ..|
|00002390| 09 2f 2f 09 67 65 74 20 | 74 68 65 20 64 69 72 49 |.//.get |the dirI|
|000023a0| 44 20 66 6f 72 20 54 48 | 49 53 20 66 6f 6c 64 65 |D for TH|IS folde|
|000023b0| 72 2c 20 6e 6f 74 20 69 | 74 27 73 20 70 61 72 65 |r, not i|t's pare|
|000023c0| 6e 74 21 0d 09 42 6c 6f | 63 6b 4d 6f 76 65 44 61 |nt!..Blo|ckMoveDa|
|000023d0| 74 61 28 6c 6f 63 61 6c | 46 53 53 70 65 63 2e 6e |ta(local|FSSpec.n|
|000023e0| 61 6d 65 2c 20 66 4e 61 | 6d 65 2c 20 33 32 29 3b |ame, fNa|me, 32);|
|000023f0| 0d 09 0d 09 63 69 70 62 | 2e 68 46 69 6c 65 49 6e |....cipb|.hFileIn|
|00002400| 66 6f 2e 69 6f 43 6f 6d | 70 6c 65 74 69 6f 6e 09 |fo.ioCom|pletion.|
|00002410| 3d 20 30 4c 3b 0d 09 63 | 69 70 62 2e 68 46 69 6c |= 0L;..c|ipb.hFil|
|00002420| 65 49 6e 66 6f 2e 69 6f | 4e 61 6d 65 50 74 72 09 |eInfo.io|NamePtr.|
|00002430| 3d 20 66 4e 61 6d 65 3b | 0d 09 63 69 70 62 2e 68 |= fName;|..cipb.h|
|00002440| 46 69 6c 65 49 6e 66 6f | 2e 69 6f 56 52 65 66 4e |FileInfo|.ioVRefN|
|00002450| 75 6d 09 3d 20 6c 6f 63 | 61 6c 46 53 53 70 65 63 |um.= loc|alFSSpec|
|00002460| 2e 76 52 65 66 4e 75 6d | 3b 0d 09 63 69 70 62 2e |.vRefNum|;..cipb.|
|00002470| 68 46 69 6c 65 49 6e 66 | 6f 2e 69 6f 46 44 69 72 |hFileInf|o.ioFDir|
|00002480| 49 6e 64 65 78 09 3d 20 | 30 3b 09 2f 2f 20 75 73 |Index.= |0;.// us|
|00002490| 65 20 74 68 65 20 64 69 | 72 20 26 20 76 52 65 66 |e the di|r & vRef|
|000024a0| 4e 75 6d 3b 0d 09 63 69 | 70 62 2e 68 46 69 6c 65 |Num;..ci|pb.hFile|
|000024b0| 49 6e 66 6f 2e 69 6f 44 | 69 72 49 44 09 09 3d 20 |Info.ioD|irID..= |
|000024c0| 6c 6f 63 61 6c 46 53 53 | 70 65 63 2e 70 61 72 49 |localFSS|pec.parI|
|000024d0| 44 3b 0d 09 65 72 72 20 | 3d 20 50 42 47 65 74 43 |D;..err |= PBGetC|
|000024e0| 61 74 49 6e 66 6f 53 79 | 6e 63 28 26 63 69 70 62 |atInfoSy|nc(&cipb|
|000024f0| 29 3b 0d 09 0d 09 69 66 | 20 28 21 65 72 72 29 20 |);....if| (!err) |
|00002500| 7b 09 09 0d 09 09 6f 72 | 69 67 44 69 72 49 44 20 |{.....or|igDirID |
|00002510| 3d 20 63 69 70 62 2e 64 | 69 72 49 6e 66 6f 2e 69 |= cipb.d|irInfo.i|
|00002520| 6f 44 72 44 69 72 49 44 | 3b 20 2f 2f 20 63 6f 70 |oDrDirID|; // cop|
|00002530| 79 20 74 68 65 20 73 75 | 63 6b 65 72 0d 09 09 69 |y the su|cker...i|
|00002540| 6e 64 65 78 20 3d 20 31 | 3b 0d 09 09 09 09 0d 09 |ndex = 1|;.......|
|00002550| 09 2f 2f 20 69 6e 64 65 | 78 20 74 68 72 6f 75 67 |.// inde|x throug|
|00002560| 68 20 61 6c 6c 20 63 6f | 6e 74 65 6e 74 73 20 6f |h all co|ntents o|
|00002570| 66 20 74 68 69 73 20 66 | 6f 6c 64 65 72 0d 09 09 |f this f|older...|
|00002580| 77 68 69 6c 65 20 28 65 | 72 72 20 3d 3d 20 6e 6f |while (e|rr == no|
|00002590| 45 72 72 29 20 7b 0d 09 | 09 09 64 69 72 49 44 20 |Err) {..|..dirID |
|000025a0| 3d 20 6f 72 69 67 44 69 | 72 49 44 3b 0d 09 09 09 |= origDi|rID;....|
|000025b0| 6c 6f 63 61 6c 49 6e 64 | 65 78 20 3d 20 69 6e 64 |localInd|ex = ind|
|000025c0| 65 78 3b 0d 09 09 09 66 | 4e 61 6d 65 20 5b 30 5d |ex;....f|Name [0]|
|000025d0| 20 3d 20 30 3b 0d 09 09 | 09 63 69 70 62 2e 68 46 | = 0;...|.cipb.hF|
|000025e0| 69 6c 65 49 6e 66 6f 2e | 69 6f 43 6f 6d 70 6c 65 |ileInfo.|ioComple|
|000025f0| 74 69 6f 6e 09 3d 20 30 | 4c 3b 0d 09 09 09 63 69 |tion.= 0|L;....ci|
|00002600| 70 62 2e 68 46 69 6c 65 | 49 6e 66 6f 2e 69 6f 4e |pb.hFile|Info.ioN|
|00002610| 61 6d 65 50 74 72 09 3d | 20 66 4e 61 6d 65 3b 0d |amePtr.=| fName;.|
|00002620| 09 09 09 63 69 70 62 2e | 68 46 69 6c 65 49 6e 66 |...cipb.|hFileInf|
|00002630| 6f 2e 69 6f 56 52 65 66 | 4e 75 6d 09 3d 20 6c 6f |o.ioVRef|Num.= lo|
|00002640| 63 61 6c 46 53 53 70 65 | 63 2e 76 52 65 66 4e 75 |calFSSpe|c.vRefNu|
|00002650| 6d 3b 0d 09 09 09 63 69 | 70 62 2e 68 46 69 6c 65 |m;....ci|pb.hFile|
|00002660| 49 6e 66 6f 2e 69 6f 46 | 44 69 72 49 6e 64 65 78 |Info.ioF|DirIndex|
|00002670| 09 3d 20 6c 6f 63 61 6c | 49 6e 64 65 78 3b 09 2f |.= local|Index;./|
|00002680| 2f 20 75 73 65 20 61 20 | 72 65 61 6c 20 69 6e 64 |/ use a |real ind|
|00002690| 65 78 0d 09 09 09 63 69 | 70 62 2e 68 46 69 6c 65 |ex....ci|pb.hFile|
|000026a0| 49 6e 66 6f 2e 69 6f 44 | 69 72 49 44 09 09 3d 20 |Info.ioD|irID..= |
|000026b0| 64 69 72 49 44 3b 0d 09 | 09 09 65 72 72 20 3d 20 |dirID;..|..err = |
|000026c0| 50 42 47 65 74 43 61 74 | 49 6e 66 6f 53 79 6e 63 |PBGetCat|InfoSync|
|000026d0| 28 26 63 69 70 62 29 3b | 0d 0d 09 09 09 69 66 20 |(&cipb);|.....if |
|000026e0| 28 21 65 72 72 29 20 7b | 0d 09 09 09 09 42 6c 6f |(!err) {|.....Blo|
|000026f0| 63 6b 4d 6f 76 65 44 61 | 74 61 28 66 4e 61 6d 65 |ckMoveDa|ta(fName|
|00002700| 2c 20 63 75 72 46 53 53 | 70 65 63 2e 6e 61 6d 65 |, curFSS|pec.name|
|00002710| 2c 20 33 32 29 3b 0d 09 | 09 09 09 63 75 72 46 53 |, 32);..|...curFS|
|00002720| 53 70 65 63 2e 76 52 65 | 66 4e 75 6d 09 3d 20 63 |Spec.vRe|fNum.= c|
|00002730| 69 70 62 2e 68 46 69 6c | 65 49 6e 66 6f 2e 69 6f |ipb.hFil|eInfo.io|
|00002740| 56 52 65 66 4e 75 6d 3b | 0d 09 09 09 09 63 75 72 |VRefNum;|.....cur|
|00002750| 46 53 53 70 65 63 2e 70 | 61 72 49 44 09 09 3d 20 |FSSpec.p|arID..= |
|00002760| 64 69 72 49 44 3b 0d 09 | 09 09 0d 09 09 09 09 2f |dirID;..|......./|
|00002770| 2a 09 0d 09 09 09 09 09 | 43 68 65 63 6b 20 74 6f |*.......|Check to|
|00002780| 20 73 65 65 20 69 66 20 | 74 68 69 73 20 65 6e 74 | see if |this ent|
|00002790| 72 79 20 69 73 20 61 20 | 66 6f 6c 64 65 72 2e 0d |ry is a |folder..|
|000027a0| 09 09 09 09 2a 2f 0d 09 | 09 09 09 69 66 20 28 63 |....*/..|...if (c|
|000027b0| 69 70 62 2e 68 46 69 6c | 65 49 6e 66 6f 2e 69 6f |ipb.hFil|eInfo.io|
|000027c0| 46 6c 41 74 74 72 69 62 | 20 26 20 69 6f 44 69 72 |FlAttrib| & ioDir|
|000027d0| 4d 61 73 6b 29 20 7b 0d | 09 09 09 09 09 65 72 72 |Mask) {.|.....err|
|000027e0| 20 3d 20 50 72 6f 63 65 | 73 73 46 6f 6c 64 65 72 | = Proce|ssFolder|
|000027f0| 28 26 63 75 72 46 53 53 | 70 65 63 2c 20 75 73 65 |(&curFSS|pec, use|
|00002800| 72 44 61 74 61 48 61 6e | 64 6c 65 29 3b 0d 09 09 |rDataHan|dle);...|
|00002810| 09 09 20 7d 20 65 6c 73 | 65 0d 09 09 09 09 09 65 |.. } els|e......e|
|00002820| 72 72 20 3d 20 50 72 6f | 63 65 73 73 49 74 65 6d |rr = Pro|cessItem|
|00002830| 28 26 63 75 72 46 53 53 | 70 65 63 2c 20 75 73 65 |(&curFSS|pec, use|
|00002840| 72 44 61 74 61 48 61 6e | 64 6c 65 29 3b 0d 09 09 |rDataHan|dle);...|
|00002850| 09 0d 09 09 09 09 2f 2a | 09 49 66 20 77 65 27 76 |....../*|.If we'v|
|00002860| 65 20 68 61 64 20 61 6e | 20 65 72 72 6f 72 2c 20 |e had an| error, |
|00002870| 67 65 74 20 6f 75 74 21 | 20 2a 2f 0d 09 09 09 09 |get out!| */.....|
|00002880| 69 66 20 28 65 72 72 29 | 09 62 72 65 61 6b 3b 0d |if (err)|.break;.|
|00002890| 0d 09 09 09 09 2f 2f 20 | 64 69 72 49 44 20 3d 20 |.....// |dirID = |
|000028a0| 6f 72 69 67 44 69 72 49 | 44 3b 09 0d 09 09 09 09 |origDirI|D;......|
|000028b0| 6c 6f 63 61 6c 49 6e 64 | 65 78 20 3d 20 69 6e 64 |localInd|ex = ind|
|000028c0| 65 78 3b 09 0d 0d 09 09 | 09 09 2f 2a 09 0d 09 09 |ex;.....|../*....|
|000028d0| 09 09 09 4e 6f 77 20 74 | 61 6b 65 20 69 6e 74 6f |...Now t|ake into|
|000028e0| 20 61 63 63 6f 75 6e 74 | 20 6e 65 77 20 66 69 6c | account| new fil|
|000028f0| 65 73 20 62 65 69 6e 67 | 20 63 72 65 61 74 65 64 |es being| created|
|00002900| 0d 09 09 09 09 09 69 6e | 20 74 68 65 20 63 75 72 |......in| the cur|
|00002910| 72 65 6e 74 20 64 69 72 | 65 63 74 6f 72 79 20 26 |rent dir|ectory &|
|00002920| 20 6d 65 73 73 69 6e 67 | 20 75 70 20 6f 75 72 20 | messing| up our |
|00002930| 69 6e 64 65 78 2e 0d 09 | 09 09 09 09 53 65 65 20 |index...|....See |
|00002940| 44 65 76 2e 43 44 20 56 | 6f 6c 2e 20 58 49 3a 54 |Dev.CD V|ol. XI:T|
|00002950| 6f 6f 6c 73 20 26 20 41 | 70 70 73 20 28 4d 6f 6f |ools & A|pps (Moo|
|00002960| 66 21 29 3a 4d 69 73 63 | 20 55 74 69 6c 69 74 69 |f!):Misc| Utiliti|
|00002970| 65 73 3a 0d 09 09 09 09 | 09 44 69 73 69 6e 66 65 |es:.....|.Disinfe|
|00002980| 63 74 61 6e 74 20 26 20 | 53 6f 75 72 63 65 20 32 |ctant & |Source 2|
|00002990| 2e 35 2e 31 3a 53 61 6d | 70 6c 65 3a 4e 6f 74 65 |.5.1:Sam|ple:Note|
|000029a0| 73 3a 53 63 61 6e 20 41 | 6c 67 09 0d 09 09 09 09 |s:Scan A|lg......|
|000029b0| 2a 2f 0d 09 09 09 09 76 | 46 4e 61 6d 65 20 5b 30 |*/.....v|FName [0|
|000029c0| 5d 20 3d 20 30 3b 0d 09 | 09 09 09 63 69 70 62 2e |] = 0;..|...cipb.|
|000029d0| 68 46 69 6c 65 49 6e 66 | 6f 2e 69 6f 43 6f 6d 70 |hFileInf|o.ioComp|
|000029e0| 6c 65 74 69 6f 6e 09 3d | 20 30 4c 3b 0d 09 09 09 |letion.=| 0L;....|
|000029f0| 09 63 69 70 62 2e 68 46 | 69 6c 65 49 6e 66 6f 2e |.cipb.hF|ileInfo.|
|00002a00| 69 6f 4e 61 6d 65 50 74 | 72 09 3d 20 76 46 4e 61 |ioNamePt|r.= vFNa|
|00002a10| 6d 65 3b 0d 09 09 09 09 | 63 69 70 62 2e 68 46 69 |me;.....|cipb.hFi|
|00002a20| 6c 65 49 6e 66 6f 2e 69 | 6f 56 52 65 66 4e 75 6d |leInfo.i|oVRefNum|
|00002a30| 09 3d 20 6c 6f 63 61 6c | 46 53 53 70 65 63 2e 76 |.= local|FSSpec.v|
|00002a40| 52 65 66 4e 75 6d 3b 0d | 09 09 09 09 63 69 70 62 |RefNum;.|....cipb|
|00002a50| 2e 68 46 69 6c 65 49 6e | 66 6f 2e 69 6f 46 44 69 |.hFileIn|fo.ioFDi|
|00002a60| 72 49 6e 64 65 78 09 3d | 20 6c 6f 63 61 6c 49 6e |rIndex.=| localIn|
|00002a70| 64 65 78 3b 09 2f 2f 20 | 75 73 65 20 61 20 72 65 |dex;.// |use a re|
|00002a80| 61 6c 20 69 6e 64 65 78 | 0d 09 09 09 09 63 69 70 |al index|.....cip|
|00002a90| 62 2e 68 46 69 6c 65 49 | 6e 66 6f 2e 69 6f 44 69 |b.hFileI|nfo.ioDi|
|00002aa0| 72 49 44 09 09 3d 20 64 | 69 72 49 44 3b 0d 09 09 |rID..= d|irID;...|
|00002ab0| 09 09 65 72 72 20 3d 20 | 50 42 47 65 74 43 61 74 |..err = |PBGetCat|
|00002ac0| 49 6e 66 6f 53 79 6e 63 | 28 26 63 69 70 62 29 3b |InfoSync|(&cipb);|
|00002ad0| 0d 09 09 09 09 6f 6c 64 | 49 6e 64 65 78 20 3d 20 |.....old|Index = |
|00002ae0| 69 6e 64 65 78 3b 0d 09 | 09 09 09 69 66 20 28 21 |index;..|...if (!|
|00002af0| 65 72 72 29 20 7b 0d 09 | 09 09 09 09 2f 2a 09 49 |err) {..|..../*.I|
|00002b00| 66 20 74 68 65 79 27 72 | 65 20 65 71 75 61 6c 20 |f they'r|e equal |
|00002b10| 2d 20 73 61 6d 65 20 70 | 6c 61 63 65 2c 20 67 6f |- same p|lace, go|
|00002b20| 20 74 6f 20 6e 65 78 74 | 20 2a 2f 0d 09 09 09 09 | to next| */.....|
|00002b30| 09 69 66 20 28 45 71 75 | 61 6c 53 74 72 69 6e 67 |.if (Equ|alString|
|00002b40| 20 28 76 46 4e 61 6d 65 | 2c 20 66 4e 61 6d 65 2c | (vFName|, fName,|
|00002b50| 20 66 61 6c 73 65 2c 20 | 66 61 6c 73 65 29 29 0d | false, |false)).|
|00002b60| 09 09 09 09 09 09 69 6e | 64 65 78 2b 2b 3b 0d 09 |......in|dex++;..|
|00002b70| 09 09 09 7d 0d 09 09 09 | 09 0d 09 09 09 09 2f 2a |...}....|....../*|
|00002b80| 09 49 66 20 77 65 20 64 | 69 64 6e 27 74 20 61 64 |.If we d|idn't ad|
|00002b90| 76 61 6e 63 65 2c 20 74 | 68 65 6e 20 70 65 72 68 |vance, t|hen perh|
|00002ba0| 61 70 73 20 61 20 66 69 | 6c 65 20 77 61 73 20 63 |aps a fi|le was c|
|00002bb0| 72 65 61 74 65 64 20 6f | 72 20 64 65 6c 65 74 65 |reated o|r delete|
|00002bc0| 64 20 2a 2f 0d 09 09 09 | 09 69 66 20 28 6f 6c 64 |d */....|.if (old|
|00002bd0| 49 6e 64 65 78 20 3d 3d | 20 69 6e 64 65 78 29 20 |Index ==| index) |
|00002be0| 7b 0d 09 09 09 09 09 6f | 6c 64 49 6e 64 65 78 09 |{......o|ldIndex.|
|00002bf0| 09 3d 20 69 6e 64 65 78 | 3b 09 2f 2a 20 73 61 76 |.= index|;./* sav|
|00002c00| 65 20 6f 66 66 20 74 68 | 65 20 6f 6c 64 20 2a 2f |e off th|e old */|
|00002c10| 0d 09 09 09 09 09 69 6e | 64 65 78 09 09 09 3d 20 |......in|dex...= |
|00002c20| 30 3b 09 09 2f 2a 20 61 | 6e 64 20 73 74 61 72 74 |0;../* a|nd start|
|00002c30| 20 61 74 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e | at the |beginnin|
|00002c40| 67 20 2a 2f 0d 09 09 09 | 09 09 65 72 72 09 09 09 |g */....|..err...|
|00002c50| 09 3d 20 6e 6f 45 72 72 | 3b 0d 09 09 09 09 09 76 |.= noErr|;......v|
|00002c60| 46 4e 61 6d 65 20 5b 30 | 5d 09 09 3d 20 30 3b 0d |FName [0|]..= 0;.|
|00002c70| 09 09 09 09 09 66 6f 75 | 6e 64 50 6f 73 69 74 69 |.....fou|ndPositi|
|00002c80| 6f 6e 09 3d 20 66 61 6c | 73 65 3b 0d 09 09 09 09 |on.= fal|se;.....|
|00002c90| 09 0d 09 09 09 09 09 77 | 68 69 6c 65 20 28 21 66 |.......w|hile (!f|
|00002ca0| 6f 75 6e 64 50 6f 73 69 | 74 69 6f 6e 29 20 7b 0d |oundPosi|tion) {.|
|00002cb0| 09 09 09 09 09 09 69 6e | 64 65 78 2b 2b 3b 0d 09 |......in|dex++;..|
|00002cc0| 09 09 09 09 09 76 46 4e | 61 6d 65 20 5b 30 5d 20 |.....vFN|ame [0] |
|00002cd0| 3d 20 30 3b 0d 09 09 09 | 09 09 09 63 69 70 62 2e |= 0;....|...cipb.|
|00002ce0| 68 46 69 6c 65 49 6e 66 | 6f 2e 69 6f 43 6f 6d 70 |hFileInf|o.ioComp|
|00002cf0| 6c 65 74 69 6f 6e 09 3d | 20 30 4c 3b 0d 09 09 09 |letion.=| 0L;....|
|00002d00| 09 09 09 63 69 70 62 2e | 68 46 69 6c 65 49 6e 66 |...cipb.|hFileInf|
|00002d10| 6f 2e 69 6f 4e 61 6d 65 | 50 74 72 09 3d 20 76 46 |o.ioName|Ptr.= vF|
|00002d20| 4e 61 6d 65 3b 0d 09 09 | 09 09 09 09 63 69 70 62 |Name;...|....cipb|
|00002d30| 2e 68 46 69 6c 65 49 6e | 66 6f 2e 69 6f 56 52 65 |.hFileIn|fo.ioVRe|
|00002d40| 66 4e 75 6d 09 3d 20 6c | 6f 63 61 6c 46 53 53 70 |fNum.= l|ocalFSSp|
|00002d50| 65 63 2e 76 52 65 66 4e | 75 6d 3b 0d 09 09 09 09 |ec.vRefN|um;.....|
|00002d60| 09 09 63 69 70 62 2e 68 | 46 69 6c 65 49 6e 66 6f |..cipb.h|FileInfo|
|00002d70| 2e 69 6f 46 44 69 72 49 | 6e 64 65 78 09 3d 20 69 |.ioFDirI|ndex.= i|
|00002d80| 6e 64 65 78 3b 09 2f 2a | 20 6e 6f 77 20 75 73 65 |ndex;./*| now use|
|00002d90| 20 61 20 72 65 61 6c 20 | 69 6e 64 65 78 20 2a 2f | a real |index */|
|00002da0| 0d 09 09 09 09 09 09 63 | 69 70 62 2e 68 46 69 6c |.......c|ipb.hFil|
|00002db0| 65 49 6e 66 6f 2e 69 6f | 44 69 72 49 44 09 09 3d |eInfo.io|DirID..=|
|00002dc0| 20 64 69 72 49 44 3b 0d | 09 09 09 09 09 09 65 72 | dirID;.|......er|
|00002dd0| 72 20 3d 20 50 42 47 65 | 74 43 61 74 49 6e 66 6f |r = PBGe|tCatInfo|
|00002de0| 53 79 6e 63 28 26 63 69 | 70 62 29 3b 0d 09 09 09 |Sync(&ci|pb);....|
|00002df0| 09 09 09 0d 09 09 09 09 | 09 09 69 66 20 28 65 72 |........|..if (er|
|00002e00| 72 20 3d 3d 20 66 6e 66 | 45 72 72 29 20 7b 20 20 |r == fnf|Err) { |
|00002e10| 2f 2f 20 77 65 27 76 65 | 20 6a 75 73 74 20 62 65 |// we've| just be|
|00002e20| 65 6e 20 64 65 6c 65 74 | 65 64 0d 09 09 09 09 09 |en delet|ed......|
|00002e30| 09 09 69 6e 64 65 78 20 | 3d 20 6f 6c 64 49 6e 64 |..index |= oldInd|
|00002e40| 65 78 3b 0d 09 09 09 09 | 09 09 09 66 6f 75 6e 64 |ex;.....|...found|
|00002e50| 50 6f 73 69 74 69 6f 6e | 20 3d 20 74 72 75 65 3b |Position| = true;|
|00002e60| 0d 09 09 09 09 09 09 09 | 65 72 72 20 3d 20 6e 6f |........|err = no|
|00002e70| 45 72 72 3b 09 2f 2f 20 | 68 61 76 65 20 74 6f 20 |Err;.// |have to |
|00002e80| 72 65 6d 65 6d 62 65 72 | 20 74 6f 20 72 65 73 65 |remember| to rese|
|00002e90| 74 20 74 68 69 73 21 0d | 09 09 09 09 09 09 7d 0d |t this!.|......}.|
|00002ea0| 09 09 09 09 09 09 0d 09 | 09 09 09 09 2f 2a 09 66 |........|..../*.f|
|00002eb0| 6f 75 6e 64 20 73 61 6d | 65 20 66 69 6c 65 20 26 |ound sam|e file &|
|00002ec0| 20 73 61 6d 65 20 69 6e | 64 65 78 20 70 6f 73 69 | same in|dex posi|
|00002ed0| 74 69 6f 6e 20 2a 2f 0d | 09 09 09 09 09 2f 2a 09 |tion */.|...../*.|
|00002ee0| 73 6f 20 74 72 79 20 74 | 68 65 20 6e 65 78 74 20 |so try t|he next |
|00002ef0| 69 74 65 6d 20 2a 2f 0d | 09 09 09 09 09 09 69 66 |item */.|......if|
|00002f00| 20 28 28 21 66 6f 75 6e | 64 50 6f 73 69 74 69 6f | ((!foun|dPositio|
|00002f10| 6e 29 20 26 26 20 45 71 | 75 61 6c 53 74 72 69 6e |n) && Eq|ualStrin|
|00002f20| 67 28 66 4e 61 6d 65 2c | 20 76 46 4e 61 6d 65 2c |g(fName,| vFName,|
|00002f30| 20 66 61 6c 73 65 2c 20 | 66 61 6c 73 65 29 29 20 | false, |false)) |
|00002f40| 7b 0d 09 09 09 09 09 09 | 09 69 6e 64 65 78 2b 2b |{.......|.index++|
|00002f50| 3b 0d 09 09 09 09 09 09 | 09 66 6f 75 6e 64 50 6f |;.......|.foundPo|
|00002f60| 73 69 74 69 6f 6e 20 3d | 20 74 72 75 65 3b 0d 09 |sition =| true;..|
|00002f70| 09 09 09 09 09 7d 0d 09 | 09 09 09 09 7d 0d 09 09 |.....}..|....}...|
|00002f80| 09 09 7d 0d 09 09 09 7d | 0d 09 09 7d 0d 09 7d 0d |..}....}|...}..}.|
|00002f90| 09 0d 09 72 65 74 75 72 | 6e 28 65 72 72 29 3b 0d |...retur|n(err);.|
|00002fa0| 7d 0d 0d 2f 2a 0d 09 54 | 68 69 73 20 72 6f 75 74 |}../*..T|his rout|
|00002fb0| 69 6e 65 20 69 73 20 63 | 61 6c 6c 65 64 20 77 68 |ine is c|alled wh|
|00002fc0| 65 6e 20 74 68 65 20 75 | 73 65 72 20 63 68 6f 6f |en the u|ser choo|
|00002fd0| 73 65 73 20 22 53 65 6c | 65 63 74 20 46 69 6c 65 |ses "Sel|ect File|
|00002fe0| c9 22 20 66 72 6f 6d 20 | 74 68 65 0d 09 46 69 6c |." from |the..Fil|
|00002ff0| 65 20 4d 65 6e 75 2e 0d | 09 0d 09 43 75 72 72 65 |e Menu..|...Curre|
|00003000| 6e 74 6c 79 20 69 74 20 | 73 69 6d 70 6c 79 20 63 |ntly it |simply c|
|00003010| 61 6c 6c 73 20 74 68 65 | 20 6e 65 77 20 53 74 61 |alls the| new Sta|
|00003020| 6e 64 61 72 64 47 65 74 | 46 69 6c 65 20 72 6f 75 |ndardGet|File rou|
|00003030| 74 69 6e 65 20 74 6f 20 | 68 61 76 65 20 74 68 65 |tine to |have the|
|00003040| 0d 09 75 73 65 72 20 73 | 65 6c 65 63 74 20 61 20 |..user s|elect a |
|00003050| 73 69 6e 67 6c 65 20 66 | 69 6c 65 20 28 61 6e 79 |single f|ile (any|
|00003060| 20 74 79 70 65 2c 20 6e | 75 6d 54 79 70 65 73 20 | type, n|umTypes |
|00003070| 3d 20 2d 31 29 20 61 6e | 64 20 74 68 65 6e 20 63 |= -1) an|d then c|
|00003080| 61 6c 6c 73 20 74 68 65 | 0d 09 53 65 6e 64 4f 44 |alls the|..SendOD|
|00003090| 4f 43 54 6f 53 65 6c 66 | 20 72 6f 75 74 69 6e 65 |OCToSelf| routine|
|000030a0| 20 69 6e 20 6f 72 64 65 | 72 20 74 6f 20 70 72 6f | in orde|r to pro|
|000030b0| 63 65 73 73 20 69 74 2e | 20 20 0d 09 09 09 0d 09 |cess it.| ......|
|000030c0| 54 68 65 20 72 65 61 73 | 6f 6e 20 77 65 20 73 65 |The reas|on we se|
|000030d0| 6e 64 20 61 6e 20 6f 64 | 6f 63 20 74 6f 20 6f 75 |nd an od|oc to ou|
|000030e0| 72 73 65 6c 76 65 73 20 | 69 73 20 74 77 6f 20 66 |rselves |is two f|
|000030f0| 6f 6c 64 3a 20 31 29 20 | 69 74 20 6b 65 65 70 73 |old: 1) |it keeps|
|00003100| 20 74 68 65 20 63 6f 64 | 65 0d 09 63 6c 65 61 6e | the cod|e..clean|
|00003110| 65 72 20 61 73 20 61 6c | 6c 20 66 69 6c 65 20 6f |er as al|l file o|
|00003120| 70 65 6e 69 6e 67 73 20 | 67 6f 20 74 68 72 6f 75 |penings |go throu|
|00003130| 67 68 20 74 68 65 20 73 | 61 6d 65 20 70 72 6f 63 |gh the s|ame proc|
|00003140| 65 73 73 2c 20 61 6e 64 | 20 32 29 20 69 66 20 65 |ess, and| 2) if e|
|00003150| 76 65 6e 74 73 0d 09 61 | 72 65 20 65 76 65 72 20 |vents..a|re ever |
|00003160| 72 65 63 6f 72 64 61 62 | 6c 65 2c 20 74 68 65 20 |recordab|le, the |
|00003170| 72 69 67 68 74 20 74 68 | 69 6e 67 73 20 68 61 70 |right th|ings hap|
|00003180| 70 65 6e 20 28 74 68 69 | 73 20 69 73 20 63 61 6c |pen (thi|s is cal|
|00003190| 6c 65 64 20 46 61 63 74 | 6f 72 69 6e 67 21 29 0d |led Fact|oring!).|
|000031a0| 0d 09 4d 6f 64 69 66 69 | 63 61 74 69 6f 6e 20 6f |..Modifi|cation o|
|000031b0| 66 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 20 74 |f this r|outine t|
|000031c0| 6f 20 6f 6e 6c 79 20 73 | 65 6c 65 63 74 20 63 65 |o only s|elect ce|
|000031d0| 72 74 61 69 6e 20 74 79 | 70 65 73 20 6f 66 20 66 |rtain ty|pes of f|
|000031e0| 69 6c 65 73 2c 20 73 65 | 6c 65 63 74 69 6f 6e 0d |iles, se|lection.|
|000031f0| 09 6f 66 20 6d 75 6c 74 | 69 70 6c 65 20 66 69 6c |.of mult|iple fil|
|00003200| 65 73 2c 20 61 6e 64 2f | 6f 72 20 68 61 6e 64 6c |es, and/|or handl|
|00003210| 69 6e 67 20 6f 66 20 66 | 6f 6c 64 65 72 20 26 20 |ing of f|older & |
|00003220| 64 69 73 6b 20 73 65 6c | 65 63 74 69 6f 6e 20 69 |disk sel|ection i|
|00003230| 73 20 6c 65 66 74 20 0d | 09 61 73 20 61 6e 20 65 |s left .|.as an e|
|00003240| 78 65 72 63 69 73 65 20 | 74 6f 20 74 68 65 20 72 |xercise |to the r|
|00003250| 65 61 64 65 72 2e 0d 2a | 2f 0d 70 61 73 63 61 6c |eader..*|/.pascal|
|00003260| 20 76 6f 69 64 20 53 65 | 6c 65 63 74 46 69 6c 65 | void Se|lectFile|
|00003270| 20 28 76 6f 69 64 29 0d | 7b 0d 09 53 74 61 6e 64 | (void).|{..Stand|
|00003280| 61 72 64 46 69 6c 65 52 | 65 70 6c 79 09 73 74 64 |ardFileR|eply.std|
|00003290| 52 65 70 6c 79 3b 0d 09 | 53 46 54 79 70 65 4c 69 |Reply;..|SFTypeLi|
|000032a0| 73 74 09 09 09 74 68 65 | 54 79 70 65 4c 69 73 74 |st...the|TypeList|
|000032b0| 3b 0d 0d 09 53 74 61 6e | 64 61 72 64 47 65 74 46 |;...Stan|dardGetF|
|000032c0| 69 6c 65 28 4e 55 4c 4c | 2c 20 2d 31 2c 20 74 68 |ile(NULL|, -1, th|
|000032d0| 65 54 79 70 65 4c 69 73 | 74 2c 20 26 73 74 64 52 |eTypeLis|t, &stdR|
|000032e0| 65 70 6c 79 29 3b 0d 09 | 69 66 20 28 73 74 64 52 |eply);..|if (stdR|
|000032f0| 65 70 6c 79 2e 73 66 47 | 6f 6f 64 29 09 2f 2f 20 |eply.sfG|ood).// |
|00003300| 75 73 65 72 20 64 69 64 | 20 6e 6f 74 20 63 61 6e |user did| not can|
|00003310| 63 65 6c 0d 09 09 53 65 | 6e 64 4f 44 4f 43 54 6f |cel...Se|ndODOCTo|
|00003320| 53 65 6c 66 28 26 73 74 | 64 52 65 70 6c 79 2e 73 |Self(&st|dReply.s|
|00003330| 66 46 69 6c 65 29 3b 09 | 2f 2f 20 73 6f 20 73 65 |fFile);.|// so se|
|00003340| 6e 64 20 6d 65 20 61 6e | 20 65 76 65 6e 74 21 0d |nd me an| event!.|
|00003350| 7d 0d 0d 2f 2a 0d 09 54 | 68 69 73 20 72 6f 75 74 |}../*..T|his rout|
|00003360| 69 6e 65 20 69 73 20 63 | 61 6c 6c 65 64 20 64 75 |ine is c|alled du|
|00003370| 72 69 6e 67 20 74 68 65 | 20 70 72 6f 67 72 61 6d |ring the| program|
|00003380| 27 73 20 69 6e 69 74 69 | 61 6c 69 7a 61 74 69 6f |'s initi|alizatio|
|00003390| 6e 20 61 6e 64 20 67 69 | 76 65 73 20 79 6f 75 0d |n and gi|ves you.|
|000033a0| 09 61 20 63 68 61 6e 63 | 65 20 74 6f 20 61 6c 6c |.a chanc|e to all|
|000033b0| 6f 63 61 74 65 20 6f 72 | 20 69 6e 69 74 69 61 6c |ocate or| initial|
|000033c0| 69 7a 65 20 61 6e 79 20 | 6f 66 20 79 6f 75 72 20 |ize any |of your |
|000033d0| 6f 77 6e 20 67 6c 6f 62 | 61 6c 73 20 74 68 61 74 |own glob|als that|
|000033e0| 20 79 6f 75 72 0d 09 64 | 72 6f 70 62 6f 78 20 6e | your..d|ropbox n|
|000033f0| 65 65 64 73 2e 0d 09 0d | 09 59 6f 75 20 72 65 74 |eeds....|.You ret|
|00003400| 75 72 6e 20 61 20 62 6f | 6f 6c 65 61 6e 20 76 61 |urn a bo|olean va|
|00003410| 6c 75 65 20 77 68 69 63 | 68 20 64 65 74 65 72 6d |lue whic|h determ|
|00003420| 69 6e 65 73 20 69 66 20 | 79 6f 75 20 77 65 72 65 |ines if |you were|
|00003430| 20 73 75 63 63 65 73 73 | 66 75 6c 2e 0d 09 52 65 | success|ful...Re|
|00003440| 74 75 72 6e 69 6e 67 20 | 66 61 6c 73 65 20 77 69 |turning |false wi|
|00003450| 6c 6c 20 63 61 75 73 65 | 20 44 72 6f 70 53 68 65 |ll cause| DropShe|
|00003460| 6c 6c 20 74 6f 20 65 78 | 69 74 20 69 6d 6d 65 64 |ll to ex|it immed|
|00003470| 69 61 74 65 6c 79 2e 0d | 2a 2f 0d 0d 70 61 73 63 |iately..|*/..pasc|
|00003480| 61 6c 20 42 6f 6f 6c 65 | 61 6e 20 49 6e 69 74 55 |al Boole|an InitU|
|00003490| 73 65 72 47 6c 6f 62 61 | 6c 73 28 76 6f 69 64 29 |serGloba|ls(void)|
|000034a0| 0d 7b 0d 09 53 74 72 32 | 35 35 20 61 70 70 4e 61 |.{..Str2|55 appNa|
|000034b0| 6d 65 3b 0d 09 0d 09 23 | 69 66 64 65 66 20 5f 5f |me;....#|ifdef __|
|000034c0| 4d 57 45 52 4b 53 5f 5f | 0d 09 53 49 4f 55 58 53 |MWERKS__|..SIOUXS|
|000034d0| 65 74 74 69 6e 67 73 2e | 69 6e 69 74 69 61 6c 69 |ettings.|initiali|
|000034e0| 7a 65 54 42 09 3d 20 46 | 41 4c 53 45 3b 0d 09 53 |zeTB.= F|ALSE;..S|
|000034f0| 49 4f 55 58 53 65 74 74 | 69 6e 67 73 2e 73 65 74 |IOUXSett|ings.set|
|00003500| 75 70 6d 65 6e 75 73 09 | 3d 20 46 41 4c 53 45 3b |upmenus.|= FALSE;|
|00003510| 0d 09 23 65 6e 64 69 66 | 0d 0d 09 72 65 74 75 72 |..#endif|...retur|
|00003520| 6e 28 74 72 75 65 29 3b | 09 2f 2f 20 6e 6f 74 68 |n(true);|.// noth|
|00003530| 69 6e 67 20 74 6f 20 64 | 6f 2c 20 69 74 20 77 65 |ing to d|o, it we|
|00003540| 20 6d 75 73 74 20 62 65 | 20 73 75 63 63 65 73 73 | must be| success|
|00003550| 66 75 6c 21 0d 7d 0d 0d | 2f 2a 0d 09 54 68 69 73 |ful!.}..|/*..This|
|00003560| 20 72 6f 75 74 69 6e 65 | 20 69 73 20 63 61 6c 6c | routine| is call|
|00003570| 65 64 20 64 75 72 69 6e | 67 20 74 68 65 20 70 72 |ed durin|g the pr|
|00003580| 6f 67 72 61 6d 27 73 20 | 63 6c 65 61 6e 75 70 20 |ogram's |cleanup |
|00003590| 61 6e 64 20 67 69 76 65 | 73 20 79 6f 75 0d 09 61 |and give|s you..a|
|000035a0| 20 63 68 61 6e 63 65 20 | 74 6f 20 64 65 61 6c 6c | chance |to deall|
|000035b0| 6f 63 61 74 65 20 61 6e | 79 20 6f 66 20 79 6f 75 |ocate an|y of you|
|000035c0| 72 20 6f 77 6e 20 67 6c | 6f 62 61 6c 73 20 74 68 |r own gl|obals th|
|000035d0| 61 74 20 79 6f 75 20 61 | 6c 6c 6f 63 61 74 65 64 |at you a|llocated|
|000035e0| 20 0d 09 69 6e 20 74 68 | 65 20 61 62 6f 76 65 20 | ..in th|e above |
|000035f0| 72 6f 75 74 69 6e 65 2e | 0d 2a 2f 0d 70 61 73 63 |routine.|.*/.pasc|
|00003600| 61 6c 20 76 6f 69 64 20 | 44 69 73 70 6f 73 65 55 |al void |DisposeU|
|00003610| 73 65 72 47 6c 6f 62 61 | 6c 73 28 76 6f 69 64 29 |serGloba|ls(void)|
|00003620| 0d 7b 0d 7d 0d 0d 6c 6f | 6e 67 20 47 65 74 46 75 |.{.}..lo|ng GetFu|
|00003630| 6c 6c 50 61 74 68 20 28 | 46 53 53 70 65 63 20 2a |llPath (|FSSpec *|
|00003640| 66 73 73 70 65 63 2c 20 | 63 68 61 72 20 2a 70 61 |fsspec, |char *pa|
|00003650| 74 68 2c 20 4f 53 45 72 | 72 20 2a 65 72 72 29 3b |th, OSEr|r *err);|
|00003660| 0d 75 6e 73 69 67 6e 65 | 64 20 73 68 6f 72 74 20 |.unsigne|d short |
|00003670| 52 65 76 65 72 73 65 43 | 6f 70 79 50 32 43 53 74 |ReverseC|opyP2CSt|
|00003680| 72 20 28 75 6e 73 69 67 | 6e 65 64 20 63 68 61 72 |r (unsig|ned char|
|00003690| 20 2a 70 61 73 2c 20 63 | 68 61 72 20 2a 63 29 3b | *pas, c|har *c);|
|000036a0| 0d 76 6f 69 64 20 52 65 | 76 65 72 73 65 43 53 74 |.void Re|verseCSt|
|000036b0| 72 20 28 63 68 61 72 20 | 2a 73 74 72 29 3b 0d 0d |r (char |*str);..|
|000036c0| 2f 2a 0d 09 54 68 69 73 | 20 72 6f 75 74 69 6e 65 |/*..This| routine|
|000036d0| 20 67 65 74 73 20 63 61 | 6c 6c 65 64 20 66 6f 72 | gets ca|lled for|
|000036e0| 20 65 61 63 68 20 69 74 | 65 6d 20 28 77 68 69 63 | each it|em (whic|
|000036f0| 68 20 63 6f 75 6c 64 20 | 62 65 20 65 69 74 68 65 |h could |be eithe|
|00003700| 72 20 61 20 66 69 6c 65 | 20 6f 72 20 61 20 66 6f |r a file| or a fo|
|00003710| 6c 64 65 72 29 0d 09 74 | 68 61 74 20 74 68 65 20 |lder)..t|hat the |
|00003720| 63 61 6c 6c 65 72 20 77 | 61 6e 74 73 20 64 72 6f |caller w|ants dro|
|00003730| 70 70 65 64 2e 20 20 54 | 68 65 20 64 65 74 65 72 |pped. T|he deter|
|00003740| 6d 69 6e 69 6e 67 20 66 | 61 63 74 6f 72 20 69 73 |mining f|actor is|
|00003750| 20 74 68 65 20 64 65 66 | 69 6e 69 74 69 6f 6e 20 | the def|inition |
|00003760| 6f 66 20 74 68 65 20 0d | 09 71 57 61 6c 6b 46 6f |of the .|.qWalkFo|
|00003770| 6c 64 65 72 20 63 6f 6d | 70 69 6c 65 72 20 64 69 |lder com|piler di|
|00003780| 72 65 63 74 69 76 65 2e | 20 20 20 45 69 74 68 65 |rective.| Eithe|
|00003790| 72 20 77 61 79 2c 20 74 | 68 65 20 69 74 65 6d 20 |r way, t|he item |
|000037a0| 69 6e 20 71 75 65 73 74 | 69 6f 6e 20 73 68 6f 75 |in quest|ion shou|
|000037b0| 6c 64 20 62 65 0d 09 70 | 72 6f 63 65 73 73 65 64 |ld be..p|rocessed|
|000037c0| 20 61 73 20 61 20 73 69 | 6e 67 6c 65 20 69 74 65 | as a si|ngle ite|
|000037d0| 6d 20 61 6e 64 20 6e 6f | 74 20 22 64 69 73 73 65 |m and no|t "disse|
|000037e0| 63 74 65 64 22 20 69 6e | 74 6f 20 63 6f 6d 70 6f |cted" in|to compo|
|000037f0| 6e 65 6e 74 20 75 6e 69 | 74 73 20 28 6c 69 6b 65 |nent uni|ts (like|
|00003800| 20 73 75 62 66 69 6c 65 | 73 0d 09 6f 66 20 61 20 | subfile|s..of a |
|00003810| 66 6f 6c 64 65 72 21 29 | 0d 2a 2f 0d 4f 53 45 72 |folder!)|.*/.OSEr|
|00003820| 72 20 50 72 6f 63 65 73 | 73 49 74 65 6d 28 46 53 |r Proces|sItem(FS|
|00003830| 53 70 65 63 50 74 72 20 | 6d 79 46 53 53 50 74 72 |SpecPtr |myFSSPtr|
|00003840| 2c 20 48 61 6e 64 6c 65 | 20 75 73 65 72 44 61 74 |, Handle| userDat|
|00003850| 61 48 61 6e 64 6c 65 29 | 0d 7b 0d 09 63 68 61 72 |aHandle)|.{..char|
|00003860| 09 70 61 74 68 5b 31 30 | 30 30 5d 3b 0d 09 4f 53 |.path[10|00];..OS|
|00003870| 45 72 72 09 65 72 72 20 | 3d 20 6e 6f 45 72 72 3b |Err.err |= noErr;|
|00003880| 0d 09 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 09 |..unsign|ed long.|
|00003890| 6c 65 6e 3b 09 0d 09 0d | 09 6c 65 6e 20 3d 20 47 |len;....|.len = G|
|000038a0| 65 74 46 75 6c 6c 50 61 | 74 68 20 28 6d 79 46 53 |etFullPa|th (myFS|
|000038b0| 53 50 74 72 2c 20 70 61 | 74 68 2c 20 26 65 72 72 |SPtr, pa|th, &err|
|000038c0| 29 3b 0d 09 69 66 20 28 | 65 72 72 20 21 3d 20 6e |);..if (|err != n|
|000038d0| 6f 45 72 72 29 20 7b 0d | 09 09 72 65 74 75 72 6e |oErr) {.|..return|
|000038e0| 20 65 72 72 3b 0d 09 7d | 0d 0d 09 69 66 20 28 70 | err;..}|...if (p|
|000038f0| 61 74 68 20 21 3d 20 4e | 55 4c 4c 29 20 7b 0d 09 |ath != N|ULL) {..|
|00003900| 09 66 69 6c 65 4e 61 6d | 65 50 74 72 20 66 69 6c |.fileNam|ePtr fil|
|00003910| 65 4e 61 6d 65 73 3b 0d | 09 09 0d 09 09 48 4c 6f |eNames;.|.....HLo|
|00003920| 63 6b 28 75 73 65 72 44 | 61 74 61 48 61 6e 64 6c |ck(userD|ataHandl|
|00003930| 65 29 3b 0d 09 09 09 66 | 69 6c 65 4e 61 6d 65 73 |e);....f|ileNames|
|00003940| 20 3d 20 2a 28 28 66 69 | 6c 65 4e 61 6d 65 48 61 | = *((fi|leNameHa|
|00003950| 6e 64 6c 65 29 20 75 73 | 65 72 44 61 74 61 48 61 |ndle) us|erDataHa|
|00003960| 6e 64 6c 65 29 3b 0d 09 | 09 09 0d 09 09 09 66 69 |ndle);..|......fi|
|00003970| 6c 65 4e 61 6d 65 73 2d | 3e 6e 61 6d 65 73 5b 28 |leNames-|>names[(|
|00003980| 66 69 6c 65 4e 61 6d 65 | 73 2d 3e 63 6f 75 6e 74 |fileName|s->count|
|00003990| 29 5d 20 3d 20 28 63 68 | 61 72 20 2a 29 20 4e 65 |)] = (ch|ar *) Ne|
|000039a0| 77 50 74 72 28 28 6c 65 | 6e 2b 31 29 20 2a 20 73 |wPtr((le|n+1) * s|
|000039b0| 69 7a 65 6f 66 28 63 68 | 61 72 29 29 3b 0d 09 09 |izeof(ch|ar));...|
|000039c0| 09 56 61 6c 69 64 61 74 | 65 50 74 72 28 66 69 6c |.Validat|ePtr(fil|
|000039d0| 65 4e 61 6d 65 73 2d 3e | 6e 61 6d 65 73 5b 28 66 |eNames->|names[(f|
|000039e0| 69 6c 65 4e 61 6d 65 73 | 2d 3e 63 6f 75 6e 74 29 |ileNames|->count)|
|000039f0| 5d 29 3b 0d 09 0d 09 09 | 09 73 74 72 63 70 79 28 |]);.....|.strcpy(|
|00003a00| 66 69 6c 65 4e 61 6d 65 | 73 2d 3e 6e 61 6d 65 73 |fileName|s->names|
|00003a10| 5b 28 66 69 6c 65 4e 61 | 6d 65 73 2d 3e 63 6f 75 |[(fileNa|mes->cou|
|00003a20| 6e 74 29 5d 2c 20 70 61 | 74 68 29 3b 0d 09 09 09 |nt)], pa|th);....|
|00003a30| 28 66 69 6c 65 4e 61 6d | 65 73 2d 3e 63 6f 75 6e |(fileNam|es->coun|
|00003a40| 74 29 2b 2b 3b 0d 09 09 | 48 55 6e 6c 6f 63 6b 28 |t)++;...|HUnlock(|
|00003a50| 75 73 65 72 44 61 74 61 | 48 61 6e 64 6c 65 29 3b |userData|Handle);|
|00003a60| 0d 09 7d 0d 0d 09 72 65 | 74 75 72 6e 28 65 72 72 |..}...re|turn(err|
|00003a70| 29 3b 0d 7d 0d 0d 6c 6f | 6e 67 20 47 65 74 46 75 |);.}..lo|ng GetFu|
|00003a80| 6c 6c 50 61 74 68 20 28 | 46 53 53 70 65 63 20 2a |llPath (|FSSpec *|
|00003a90| 66 73 73 70 65 63 2c 20 | 63 68 61 72 20 2a 70 61 |fsspec, |char *pa|
|00003aa0| 74 68 2c 20 4f 53 45 72 | 72 20 2a 65 72 72 29 0d |th, OSEr|r *err).|
|00003ab0| 7b 0d 09 73 68 6f 72 74 | 09 09 76 6f 6c 75 6d 65 |{..short|..volume|
|00003ac0| 20 3d 20 66 73 73 70 65 | 63 2d 3e 76 52 65 66 4e | = fsspe|c->vRefN|
|00003ad0| 75 6d 3b 0d 09 4f 53 45 | 72 72 09 09 66 73 45 72 |um;..OSE|rr..fsEr|
|00003ae0| 72 20 3d 20 6e 6f 45 72 | 72 3b 0d 09 43 49 6e 66 |r = noEr|r;..CInf|
|00003af0| 6f 50 42 52 65 63 09 63 | 61 74 69 6e 66 6f 3b 0d |oPBRec.c|atinfo;.|
|00003b00| 09 63 68 61 72 09 09 09 | 64 69 72 4e 61 6d 65 5b |.char...|dirName[|
|00003b10| 36 34 5d 3b 0d 09 6c 6f | 6e 67 09 09 09 72 65 74 |64];..lo|ng...ret|
|00003b20| 4c 65 6e 20 3d 20 30 4c | 2c 20 6c 65 6e 3b 0d 09 |Len = 0L|, len;..|
|00003b30| 72 65 67 69 73 74 65 72 | 20 63 68 61 72 09 2a 70 |register| char.*p|
|00003b40| 20 3d 20 70 61 74 68 3b | 0d 09 0d 09 2f 2f 20 41 | = path;|....// A|
|00003b50| 6c 6c 20 63 6f 6d 6d 65 | 6e 74 73 20 61 73 73 75 |ll comme|nts assu|
|00003b60| 6d 65 20 61 20 20 66 69 | 6c 65 20 77 68 6f 73 65 |me a fi|le whose|
|00003b70| 20 66 75 6c 6c 20 70 61 | 74 68 20 69 73 0d 09 2f | full pa|th is../|
|00003b80| 2f 09 48 44 3a 46 6f 6e | 74 73 3a 47 61 72 61 6d |/.HD:Fon|ts:Garam|
|00003b90| 6f 6e 64 0d 09 0d 09 2f | 2f 20 49 66 20 66 73 73 |ond..../|/ If fss|
|00003ba0| 70 65 63 20 64 6f 65 73 | 6e 27 74 20 64 65 73 69 |pec does|n't desi|
|00003bb0| 67 6e 61 74 65 20 61 20 | 66 69 6c 65 20 28 69 2e |gnate a |file (i.|
|00003bc0| 65 2e 2c 20 69 74 27 73 | 20 61 20 76 6f 6c 75 6d |e., it's| a volum|
|00003bd0| 65 20 6f 72 20 64 69 72 | 65 63 74 6f 72 79 29 2c |e or dir|ectory),|
|00003be0| 20 77 65 20 77 72 69 74 | 65 20 61 20 63 6f 6c 6f | we writ|e a colo|
|00003bf0| 6e 0d 09 69 66 20 28 20 | 46 53 70 49 73 46 6f 6c |n..if ( |FSpIsFol|
|00003c00| 64 65 72 20 28 66 73 73 | 70 65 63 29 29 20 7b 0d |der (fss|pec)) {.|
|00003c10| 09 09 2a 70 2b 2b 20 3d | 20 27 3a 27 3b 0d 09 09 |..*p++ =| ':';...|
|00003c20| 72 65 74 4c 65 6e 2b 2b | 3b 0d 09 7d 0d 09 0d 09 |retLen++|;..}....|
|00003c30| 2f 2f 20 46 69 72 73 74 | 2c 20 63 6f 70 79 20 74 |// First|, copy t|
|00003c40| 68 65 20 66 69 6c 65 20 | 6e 61 6d 65 20 62 61 63 |he file |name bac|
|00003c50| 6b 77 61 72 64 73 20 66 | 72 6f 6d 20 61 20 50 61 |kwards f|rom a Pa|
|00003c60| 73 63 61 6c 20 74 6f 20 | 61 20 43 20 73 74 72 69 |scal to |a C stri|
|00003c70| 6e 67 3a 0d 09 2f 2f 09 | 22 5c 70 47 61 72 61 6d |ng:..//.|"\pGaram|
|00003c80| 6f 6e 64 22 20 20 62 65 | 63 6f 6d 65 73 20 22 64 |ond" be|comes "d|
|00003c90| 6e 6f 6d 61 72 61 47 22 | 0d 0d 09 6c 65 6e 20 3d |nomaraG"|...len =|
|00003ca0| 20 28 6c 6f 6e 67 29 20 | 52 65 76 65 72 73 65 43 | (long) |ReverseC|
|00003cb0| 6f 70 79 50 32 43 53 74 | 72 20 28 66 73 73 70 65 |opyP2CSt|r (fsspe|
|00003cc0| 63 2d 3e 6e 61 6d 65 2c | 20 70 29 3b 0d 09 70 20 |c->name,| p);..p |
|00003cd0| 2b 3d 20 6c 65 6e 3b 0d | 09 72 65 74 4c 65 6e 20 |+= len;.|.retLen |
|00003ce0| 2b 3d 20 6c 65 6e 3b 0d | 09 0d 09 2f 2a 20 59 65 |+= len;.|.../* Ye|
|00003cf0| 61 2c 20 49 20 6b 6e 6f | 77 20 74 68 69 73 20 69 |a, I kno|w this i|
|00003d00| 73 20 63 68 65 61 70 2c | 20 62 75 74 20 69 74 20 |s cheap,| but it |
|00003d10| 69 73 20 75 73 65 64 20 | 4f 4e 43 45 20 41 4e 44 |is used |ONCE AND|
|00003d20| 20 69 74 20 6d 61 6b 65 | 73 20 69 74 20 63 6c 65 | it make|s it cle|
|00003d30| 61 72 65 72 20 7b 52 57 | 44 7d 20 2a 2f 0d 09 0d |arer {RW|D} */...|
|00003d40| 09 23 64 65 66 69 6e 65 | 20 46 53 70 49 73 56 6f |.#define| FSpIsVo|
|00003d50| 6c 75 6d 65 28 46 53 53 | 70 65 63 29 20 28 28 46 |lume(FSS|pec) ((F|
|00003d60| 53 53 70 65 63 29 2d 3e | 70 61 72 49 44 20 3d 3d |SSpec)->|parID ==|
|00003d70| 20 66 73 52 74 50 61 72 | 49 44 29 0d 09 0d 09 69 | fsRtPar|ID)....i|
|00003d80| 66 20 28 20 21 20 46 53 | 70 49 73 56 6f 6c 75 6d |f ( ! FS|pIsVolum|
|00003d90| 65 20 28 66 73 73 70 65 | 63 29 29 20 7b 09 09 2f |e (fsspe|c)) {../|
|00003da0| 2f 20 44 6f 6e 27 74 20 | 64 6f 20 61 6e 79 74 68 |/ Don't |do anyth|
|00003db0| 69 6e 67 20 6d 6f 72 65 | 20 69 66 20 77 65 27 76 |ing more| if we'v|
|00003dc0| 65 20 67 6f 74 20 61 20 | 76 6f 6c 75 6d 65 0d 09 |e got a |volume..|
|00003dd0| 0d 09 09 63 61 74 69 6e | 66 6f 2e 64 69 72 49 6e |...catin|fo.dirIn|
|00003de0| 66 6f 2e 69 6f 56 52 65 | 66 4e 75 6d 20 3d 20 76 |fo.ioVRe|fNum = v|
|00003df0| 6f 6c 75 6d 65 3b 0d 09 | 09 63 61 74 69 6e 66 6f |olume;..|.catinfo|
|00003e00| 2e 64 69 72 49 6e 66 6f | 2e 69 6f 4e 61 6d 65 50 |.dirInfo|.ioNameP|
|00003e10| 74 72 20 3d 20 28 53 74 | 72 69 6e 67 50 74 72 29 |tr = (St|ringPtr)|
|00003e20| 20 64 69 72 4e 61 6d 65 | 3b 0d 09 09 63 61 74 69 | dirName|;...cati|
|00003e30| 6e 66 6f 2e 64 69 72 49 | 6e 66 6f 2e 69 6f 44 72 |nfo.dirI|nfo.ioDr|
|00003e40| 50 61 72 49 44 20 3d 20 | 66 73 73 70 65 63 2d 3e |ParID = |fsspec->|
|00003e50| 70 61 72 49 44 3b 0d 09 | 09 0d 09 09 2f 2f 20 4e |parID;..|....// N|
|00003e60| 6f 77 20 63 6f 70 79 20 | 74 68 65 20 72 65 73 74 |ow copy |the rest|
|00003e70| 20 6f 66 20 74 68 65 20 | 70 61 74 68 2c 20 6f 6e | of the |path, on|
|00003e80| 65 20 6c 65 76 65 6c 20 | 61 74 20 61 20 74 69 6d |e level |at a tim|
|00003e90| 65 2c 20 62 61 63 6b 77 | 61 72 64 73 3a 0d 09 09 |e, backw|ards:...|
|00003ea0| 2f 2f 09 22 64 6e 6f 6d | 61 72 61 47 3a 73 74 6e |//."dnom|araG:stn|
|00003eb0| 6f 46 3a 44 48 22 0d 09 | 09 64 6f 20 7b 0d 09 09 |oF:DH"..|.do {...|
|00003ec0| 09 63 61 74 69 6e 66 6f | 2e 64 69 72 49 6e 66 6f |.catinfo|.dirInfo|
|00003ed0| 2e 69 6f 46 44 69 72 49 | 6e 64 65 78 20 3d 20 2d |.ioFDirI|ndex = -|
|00003ee0| 31 3b 0d 09 09 09 63 61 | 74 69 6e 66 6f 2e 64 69 |1;....ca|tinfo.di|
|00003ef0| 72 49 6e 66 6f 2e 69 6f | 44 72 44 69 72 49 44 20 |rInfo.io|DrDirID |
|00003f00| 3d 20 63 61 74 69 6e 66 | 6f 2e 64 69 72 49 6e 66 |= catinf|o.dirInf|
|00003f10| 6f 2e 69 6f 44 72 50 61 | 72 49 44 3b 09 2f 2f 20 |o.ioDrPa|rID;.// |
|00003f20| 3c 3d 20 54 68 69 73 20 | 69 73 20 74 68 65 20 6b |<= This |is the k|
|00003f30| 65 79 20 d1 20 67 6f 20 | 66 72 6f 6d 20 74 68 65 |ey . go |from the|
|00003f40| 0d 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 2f |........|......./|
|00003f50| 2f 09 63 75 72 72 65 6e | 74 20 66 6f 6c 64 65 72 |/.curren|t folder|
|00003f60| 20 74 6f 20 69 74 73 20 | 70 61 72 65 6e 74 0d 09 | to its |parent..|
|00003f70| 09 09 66 73 45 72 72 20 | 3d 20 50 42 47 65 74 43 |..fsErr |= PBGetC|
|00003f80| 61 74 49 6e 66 6f 53 79 | 6e 63 20 28 26 63 61 74 |atInfoSy|nc (&cat|
|00003f90| 69 6e 66 6f 29 3b 0d 09 | 09 09 69 66 20 28 66 73 |info);..|..if (fs|
|00003fa0| 45 72 72 20 3d 3d 20 6e | 6f 45 72 72 29 20 7b 0d |Err == n|oErr) {.|
|00003fb0| 09 09 09 09 2a 70 2b 2b | 20 3d 20 27 3a 27 3b 0d |....*p++| = ':';.|
|00003fc0| 09 09 09 09 72 65 74 4c | 65 6e 20 2b 3d 20 31 20 |....retL|en += 1 |
|00003fd0| 2b 20 28 6c 65 6e 20 3d | 20 52 65 76 65 72 73 65 |+ (len =| Reverse|
|00003fe0| 43 6f 70 79 50 32 43 53 | 74 72 20 28 28 53 74 72 |CopyP2CS|tr ((Str|
|00003ff0| 69 6e 67 50 74 72 29 20 | 64 69 72 4e 61 6d 65 2c |ingPtr) |dirName,|
|00004000| 20 70 29 29 3b 0d 09 09 | 09 09 70 20 2b 3d 20 6c | p));...|..p += l|
|00004010| 65 6e 3b 0d 09 09 09 7d | 20 65 6c 73 65 20 7b 0d |en;....}| else {.|
|00004020| 09 09 09 09 2a 65 72 72 | 20 3d 20 66 73 45 72 72 |....*err| = fsErr|
|00004030| 3b 0d 09 09 09 09 72 65 | 74 75 72 6e 20 72 65 74 |;.....re|turn ret|
|00004040| 4c 65 6e 3b 0d 09 09 09 | 7d 0d 09 09 7d 20 77 68 |Len;....|}...} wh|
|00004050| 69 6c 65 20 28 63 61 74 | 69 6e 66 6f 2e 64 69 72 |ile (cat|info.dir|
|00004060| 49 6e 66 6f 2e 69 6f 44 | 72 44 69 72 49 44 20 21 |Info.ioD|rDirID !|
|00004070| 3d 20 66 73 52 74 44 69 | 72 49 44 29 3b 0d 09 7d |= fsRtDi|rID);..}|
|00004080| 0d 09 0d 09 2f 2f 20 46 | 69 6e 61 6c 6c 79 2c 20 |....// F|inally, |
|00004090| 72 65 76 65 72 73 65 20 | 74 68 65 20 73 74 72 69 |reverse |the stri|
|000040a0| 6e 67 20 61 6e 64 20 72 | 65 74 75 72 6e 20 69 74 |ng and r|eturn it|
|000040b0| 73 20 6c 65 6e 67 74 68 | 20 61 6e 64 20 61 6e 79 |s length| and any|
|000040c0| 20 65 72 72 6f 72 20 74 | 68 61 74 20 6d 69 67 68 | error t|hat migh|
|000040d0| 74 20 68 61 76 65 20 6f | 63 63 75 72 72 65 64 20 |t have o|ccurred |
|000040e0| 28 52 65 76 65 72 73 65 | 43 6f 70 79 50 32 43 53 |(Reverse|CopyP2CS|
|000040f0| 74 72 20 68 61 73 0d 09 | 2f 2f 09 61 6c 72 65 61 |tr has..|//.alrea|
|00004100| 64 79 20 61 70 70 65 6e | 64 65 64 20 61 20 6e 75 |dy appen|ded a nu|
|00004110| 6c 6c 20 63 68 61 72 61 | 63 74 65 72 2c 20 73 6f |ll chara|cter, so|
|00004120| 20 77 65 20 64 6f 6e 27 | 74 20 68 61 76 65 20 74 | we don'|t have t|
|00004130| 6f 20 77 6f 72 72 79 20 | 61 62 6f 75 74 20 69 74 |o worry |about it|
|00004140| 20 68 65 72 65 29 0d 09 | 52 65 76 65 72 73 65 43 | here)..|ReverseC|
|00004150| 53 74 72 20 28 70 61 74 | 68 29 3b 0d 09 2a 65 72 |Str (pat|h);..*er|
|00004160| 72 20 3d 20 66 73 45 72 | 72 3b 0d 09 72 65 74 75 |r = fsEr|r;..retu|
|00004170| 72 6e 20 72 65 74 4c 65 | 6e 3b 0d 7d 0d 0d 75 6e |rn retLe|n;.}..un|
|00004180| 73 69 67 6e 65 64 20 73 | 68 6f 72 74 20 52 65 76 |signed s|hort Rev|
|00004190| 65 72 73 65 43 6f 70 79 | 50 32 43 53 74 72 20 28 |erseCopy|P2CStr (|
|000041a0| 72 65 67 69 73 74 65 72 | 20 75 6e 73 69 67 6e 65 |register| unsigne|
|000041b0| 64 20 63 68 61 72 20 2a | 70 61 73 2c 20 72 65 67 |d char *|pas, reg|
|000041c0| 69 73 74 65 72 20 63 68 | 61 72 20 2a 63 29 0d 7b |ister ch|ar *c).{|
|000041d0| 0d 09 72 65 67 69 73 74 | 65 72 20 73 68 6f 72 74 |..regist|er short|
|000041e0| 09 69 2c 20 6c 65 6e 20 | 3d 20 2a 70 61 73 2b 2b |.i, len |= *pas++|
|000041f0| 3b 0d 09 0d 09 66 6f 72 | 20 28 69 20 3d 20 6c 65 |;....for| (i = le|
|00004200| 6e 2c 20 63 20 2b 3d 20 | 6c 65 6e 3b 20 69 20 3e |n, c += |len; i >|
|00004210| 20 30 3b 20 69 2d 2d 29 | 0d 09 09 2a 2d 2d 63 20 | 0; i--)|...*--c |
|00004220| 3d 20 2a 70 61 73 2b 2b | 3b 0d 09 63 20 2b 3d 20 |= *pas++|;..c += |
|00004230| 6c 65 6e 3b 0d 09 2a 63 | 20 3d 20 27 5c 30 27 3b |len;..*c| = '\0';|
|00004240| 0d 09 72 65 74 75 72 6e | 20 6c 65 6e 3b 0d 7d 0d |..return| len;.}.|
|00004250| 0d 76 6f 69 64 20 52 65 | 76 65 72 73 65 43 53 74 |.void Re|verseCSt|
|00004260| 72 20 28 72 65 67 69 73 | 74 65 72 20 63 68 61 72 |r (regis|ter char|
|00004270| 20 2a 73 74 72 29 0d 7b | 0d 09 72 65 67 69 73 74 | *str).{|..regist|
|00004280| 65 72 20 73 68 6f 72 74 | 09 09 6e 20 3d 20 30 4c |er short|..n = 0L|
|00004290| 2c 20 69 3b 0d 09 72 65 | 67 69 73 74 65 72 20 63 |, i;..re|gister c|
|000042a0| 68 61 72 09 09 74 2c 20 | 2a 70 31 2c 20 2a 70 32 |har..t, |*p1, *p2|
|000042b0| 3b 0d 09 0d 09 70 31 20 | 3d 20 70 32 20 3d 20 73 |;....p1 |= p2 = s|
|000042c0| 74 72 3b 0d 09 77 68 69 | 6c 65 20 28 2a 70 32 2b |tr;..whi|le (*p2+|
|000042d0| 2b 29 0d 09 09 3b 0d 09 | 70 32 2d 2d 3b 0d 09 6e |+)...;..|p2--;..n|
|000042e0| 20 3d 20 28 70 32 20 2d | 20 70 31 29 20 2f 20 32 | = (p2 -| p1) / 2|
|000042f0| 3b 0d 09 66 6f 72 20 28 | 69 20 3d 20 6e 3b 20 69 |;..for (|i = n; i|
|00004300| 20 3e 20 30 3b 20 69 2d | 2d 29 20 7b 0d 09 09 74 | > 0; i-|-) {...t|
|00004310| 20 3d 20 2a 2d 2d 70 32 | 3b 0d 09 09 2a 70 32 20 | = *--p2|;...*p2 |
|00004320| 3d 20 2a 70 31 3b 0d 09 | 09 2a 70 31 2b 2b 20 3d |= *p1;..|.*p1++ =|
|00004330| 20 74 3b 0d 09 7d 0d 7d | 0d 0d 73 74 61 74 69 63 | t;..}.}|..static|
|00004340| 20 76 6f 69 64 20 53 65 | 74 41 70 70 6c 69 63 61 | void Se|tApplica|
|00004350| 74 69 6f 6e 4e 61 6d 65 | 28 48 61 6e 64 6c 65 20 |tionName|(Handle |
|00004360| 75 73 65 72 44 61 74 61 | 48 61 6e 64 6c 65 29 20 |userData|Handle) |
|00004370| 7b 0d 0d 09 53 74 72 32 | 35 35 20 61 70 70 4e 61 |{...Str2|55 appNa|
|00004380| 6d 65 3b 0d 09 66 69 6c | 65 4e 61 6d 65 50 74 72 |me;..fil|eNamePtr|
|00004390| 20 66 69 6c 65 4e 61 6d | 65 73 3b 0d 09 0d 09 47 | fileNam|es;....G|
|000043a0| 65 74 4d 79 41 70 70 4e | 61 6d 65 28 61 70 70 4e |etMyAppN|ame(appN|
|000043b0| 61 6d 65 29 3b 0d 09 0d | 09 48 4c 6f 63 6b 28 75 |ame);...|.HLock(u|
|000043c0| 73 65 72 44 61 74 61 48 | 61 6e 64 6c 65 29 3b 0d |serDataH|andle);.|
|000043d0| 09 09 66 69 6c 65 4e 61 | 6d 65 73 20 3d 20 2a 28 |..fileNa|mes = *(|
|000043e0| 28 66 69 6c 65 4e 61 6d | 65 48 61 6e 64 6c 65 29 |(fileNam|eHandle)|
|000043f0| 20 75 73 65 72 44 61 74 | 61 48 61 6e 64 6c 65 29 | userDat|aHandle)|
|00004400| 3b 0d 09 09 69 66 20 28 | 20 66 69 6c 65 4e 61 6d |;...if (| fileNam|
|00004410| 65 73 2d 3e 6e 61 6d 65 | 73 5b 30 5d 20 3d 3d 20 |es->name|s[0] == |
|00004420| 4e 55 4c 4c 29 20 7b 0d | 09 09 09 66 69 6c 65 4e |NULL) {.|...fileN|
|00004430| 61 6d 65 73 2d 3e 6e 61 | 6d 65 73 5b 30 5d 20 3d |ames->na|mes[0] =|
|00004440| 20 28 63 68 61 72 20 2a | 29 20 4e 65 77 50 74 72 | (char *|) NewPtr|
|00004450| 28 2a 2a 66 69 6c 65 4e | 61 6d 65 73 2d 3e 6e 61 |(**fileN|ames->na|
|00004460| 6d 65 73 20 2b 20 31 29 | 3b 20 2f 2a 20 70 73 74 |mes + 1)|; /* pst|
|00004470| 72 27 73 20 73 69 7a 65 | 20 69 6e 20 62 79 74 65 |r's size| in byte|
|00004480| 20 30 20 2a 2f 0d 09 09 | 09 69 66 20 28 66 69 6c | 0 */...|.if (fil|
|00004490| 65 4e 61 6d 65 73 2d 3e | 6e 61 6d 65 73 5b 30 5d |eNames->|names[0]|
|000044a0| 20 3d 3d 20 4e 55 4c 4c | 20 7c 7c 20 4d 65 6d 45 | == NULL| || MemE|
|000044b0| 72 72 6f 72 28 29 29 20 | 7b 0d 09 09 09 09 53 79 |rror()) |{.....Sy|
|000044c0| 73 42 65 65 70 28 36 30 | 29 3b 0d 09 09 09 09 45 |sBeep(60|);.....E|
|000044d0| 78 69 74 54 6f 53 68 65 | 6c 6c 28 29 3b 0d 09 09 |xitToShe|ll();...|
|000044e0| 09 7d 0d 09 09 09 73 74 | 72 63 70 79 28 66 69 6c |.}....st|rcpy(fil|
|000044f0| 65 4e 61 6d 65 73 2d 3e | 6e 61 6d 65 73 5b 30 5d |eNames->|names[0]|
|00004500| 2c 20 70 32 63 73 74 72 | 28 61 70 70 4e 61 6d 65 |, p2cstr|(appName|
|00004510| 29 29 3b 0d 09 09 7d 0d | 09 48 55 6e 6c 6f 63 6b |));...}.|.HUnlock|
|00004520| 28 75 73 65 72 44 61 74 | 61 48 61 6e 64 6c 65 29 |(userDat|aHandle)|
|00004530| 3b 0d 7d 0d 0d 73 74 61 | 74 69 63 20 76 6f 69 64 |;.}..sta|tic void|
|00004540| 20 41 6c 6c 6f 63 61 74 | 65 41 70 70 4e 61 6d 65 | Allocat|eAppName|
|00004550| 73 28 48 61 6e 64 6c 65 | 20 2a 75 73 65 72 44 61 |s(Handle| *userDa|
|00004560| 74 61 48 61 6e 64 6c 65 | 2c 20 75 6e 73 69 67 6e |taHandle|, unsign|
|00004570| 65 64 20 6c 6f 6e 67 20 | 6e 75 6d 4f 66 46 69 6c |ed long |numOfFil|
|00004580| 65 73 29 20 7b 0d 0d 09 | 66 69 6c 65 4e 61 6d 65 |es) {...|fileName|
|00004590| 48 61 6e 64 6c 65 20 66 | 69 6c 65 4e 61 6d 65 48 |Handle f|ileNameH|
|000045a0| 64 6c 3b 0d 09 66 69 6c | 65 4e 61 6d 65 50 74 72 |dl;..fil|eNamePtr|
|000045b0| 20 66 69 6c 65 4e 61 6d | 65 73 3b 0d 09 66 69 6c | fileNam|es;..fil|
|000045c0| 65 4e 61 6d 65 48 64 6c | 20 3d 20 28 66 69 6c 65 |eNameHdl| = (file|
|000045d0| 4e 61 6d 65 48 61 6e 64 | 6c 65 29 20 4e 65 77 48 |NameHand|le) NewH|
|000045e0| 61 6e 64 6c 65 43 6c 65 | 61 72 28 73 69 7a 65 6f |andleCle|ar(sizeo|
|000045f0| 66 28 66 69 6c 65 4e 61 | 6d 65 4c 69 73 74 29 29 |f(fileNa|meList))|
|00004600| 3b 0d 09 69 66 20 28 21 | 66 69 6c 65 4e 61 6d 65 |;..if (!|fileName|
|00004610| 48 64 6c 20 7c 7c 20 4d | 65 6d 45 72 72 6f 72 28 |Hdl || M|emError(|
|00004620| 29 20 29 20 7b 0d 09 09 | 53 79 73 42 65 65 70 28 |) ) {...|SysBeep(|
|00004630| 36 30 29 3b 0d 09 09 45 | 78 69 74 54 6f 53 68 65 |60);...E|xitToShe|
|00004640| 6c 6c 28 29 3b 0d 09 7d | 0d 09 0d 09 48 4c 6f 63 |ll();..}|....HLoc|
|00004650| 6b 28 28 48 61 6e 64 6c | 65 29 20 66 69 6c 65 4e |k((Handl|e) fileN|
|00004660| 61 6d 65 48 64 6c 29 3b | 0d 09 09 66 69 6c 65 4e |ameHdl);|...fileN|
|00004670| 61 6d 65 73 20 3d 20 2a | 66 69 6c 65 4e 61 6d 65 |ames = *|fileName|
|00004680| 48 64 6c 3b 0d 09 09 0d | 09 09 66 69 6c 65 4e 61 |Hdl;....|..fileNa|
|00004690| 6d 65 73 2d 3e 63 6f 75 | 6e 74 20 3d 20 31 3b 20 |mes->cou|nt = 1; |
|000046a0| 2f 2a 20 77 65 20 63 6f | 75 6e 74 20 6f 6e 65 20 |/* we co|unt one |
|000046b0| 72 69 67 68 74 20 6f 66 | 66 20 66 6f 72 20 74 68 |right of|f for th|
|000046c0| 65 20 61 70 70 20 6e 61 | 6d 65 20 2a 2f 0d 09 09 |e app na|me */...|
|000046d0| 66 69 6c 65 4e 61 6d 65 | 73 2d 3e 6e 61 6d 65 73 |fileName|s->names|
|000046e0| 20 3d 20 28 63 68 61 72 | 20 2a 2a 29 20 4e 65 77 | = (char| **) New|
|000046f0| 50 74 72 43 6c 65 61 72 | 28 28 6e 75 6d 4f 66 46 |PtrClear|((numOfF|
|00004700| 69 6c 65 73 20 2b 20 31 | 29 20 2a 20 73 69 7a 65 |iles + 1|) * size|
|00004710| 6f 66 28 63 68 61 72 20 | 2a 29 29 3b 0d 09 09 69 |of(char |*));...i|
|00004720| 66 20 28 66 69 6c 65 4e | 61 6d 65 73 2d 3e 6e 61 |f (fileN|ames->na|
|00004730| 6d 65 73 20 3d 3d 20 4e | 55 4c 4c 29 20 7b 0d 09 |mes == N|ULL) {..|
|00004740| 09 09 53 79 73 42 65 65 | 70 28 36 30 29 3b 0d 09 |..SysBee|p(60);..|
|00004750| 09 09 45 78 69 74 54 6f | 53 68 65 6c 6c 28 29 3b |..ExitTo|Shell();|
|00004760| 0d 09 09 7d 0d 09 09 66 | 69 6c 65 4e 61 6d 65 73 |...}...f|ileNames|
|00004770| 20 3d 20 4e 55 4c 4c 3b | 0d 09 48 55 6e 6c 6f 63 | = NULL;|..HUnloc|
|00004780| 6b 28 28 48 61 6e 64 6c | 65 29 20 66 69 6c 65 4e |k((Handl|e) fileN|
|00004790| 61 6d 65 48 64 6c 29 3b | 0d 09 0d 09 2a 75 73 65 |ameHdl);|....*use|
|000047a0| 72 44 61 74 61 48 61 6e | 64 6c 65 20 3d 20 28 48 |rDataHan|dle = (H|
|000047b0| 61 6e 64 6c 65 29 20 66 | 69 6c 65 4e 61 6d 65 48 |andle) f|ileNameH|
|000047c0| 64 6c 3b 0d 7d 0d 0d 73 | 74 61 74 69 63 20 76 6f |dl;.}..s|tatic vo|
|000047d0| 69 64 20 44 65 61 6c 6c | 6f 63 61 74 65 41 70 70 |id Deall|ocateApp|
|000047e0| 4e 61 6d 65 73 28 48 61 | 6e 64 6c 65 20 75 73 65 |Names(Ha|ndle use|
|000047f0| 72 44 61 74 61 48 61 6e | 64 6c 65 29 20 7b 0d 0d |rDataHan|dle) {..|
|00004800| 09 66 69 6c 65 4e 61 6d | 65 50 74 72 20 66 69 6c |.fileNam|ePtr fil|
|00004810| 65 4e 61 6d 65 73 3b 0d | 09 75 6e 73 69 67 6e 65 |eNames;.|.unsigne|
|00004820| 64 20 69 6e 74 20 69 6e | 64 65 78 3b 0d 09 0d 09 |d int in|dex;....|
|00004830| 48 4c 6f 63 6b 28 75 73 | 65 72 44 61 74 61 48 61 |HLock(us|erDataHa|
|00004840| 6e 64 6c 65 29 3b 0d 09 | 09 66 69 6c 65 4e 61 6d |ndle);..|.fileNam|
|00004850| 65 73 20 3d 20 2a 28 28 | 66 69 6c 65 4e 61 6d 65 |es = *((|fileName|
|00004860| 48 61 6e 64 6c 65 29 20 | 75 73 65 72 44 61 74 61 |Handle) |userData|
|00004870| 48 61 6e 64 6c 65 29 3b | 0d 09 09 66 6f 72 20 28 |Handle);|...for (|
|00004880| 69 6e 64 65 78 20 3d 20 | 30 3b 20 69 6e 64 65 78 |index = |0; index|
|00004890| 20 3c 20 66 69 6c 65 4e | 61 6d 65 73 2d 3e 63 6f | < fileN|ames->co|
|000048a0| 75 6e 74 3b 20 69 6e 64 | 65 78 2b 2b 29 20 7b 0d |unt; ind|ex++) {.|
|000048b0| 09 09 09 69 66 20 28 66 | 69 6c 65 4e 61 6d 65 73 |...if (f|ileNames|
|000048c0| 2d 3e 6e 61 6d 65 73 5b | 69 6e 64 65 78 5d 20 21 |->names[|index] !|
|000048d0| 3d 20 4e 55 4c 4c 29 20 | 7b 0d 09 09 09 09 44 69 |= NULL) |{.....Di|
|000048e0| 73 70 6f 73 65 50 74 72 | 28 66 69 6c 65 4e 61 6d |sposePtr|(fileNam|
|000048f0| 65 73 2d 3e 6e 61 6d 65 | 73 5b 69 6e 64 65 78 5d |es->name|s[index]|
|00004900| 29 3b 0d 09 09 09 09 69 | 66 20 28 4d 65 6d 45 72 |);.....i|f (MemEr|
|00004910| 72 6f 72 28 29 29 20 7b | 0d 09 09 09 09 09 53 79 |ror()) {|......Sy|
|00004920| 73 42 65 65 70 28 36 30 | 29 3b 0d 09 09 09 09 09 |sBeep(60|);......|
|00004930| 45 78 69 74 54 6f 53 68 | 65 6c 6c 28 29 3b 0d 09 |ExitToSh|ell();..|
|00004940| 09 09 09 7d 0d 09 09 09 | 09 66 69 6c 65 4e 61 6d |...}....|.fileNam|
|00004950| 65 73 2d 3e 6e 61 6d 65 | 73 5b 69 6e 64 65 78 5d |es->name|s[index]|
|00004960| 20 3d 20 4e 55 4c 4c 3b | 0d 09 09 09 7d 0d 09 09 | = NULL;|....}...|
|00004970| 7d 0d 09 09 44 69 73 70 | 6f 73 65 50 74 72 28 28 |}...Disp|osePtr((|
|00004980| 50 74 72 29 20 66 69 6c | 65 4e 61 6d 65 73 2d 3e |Ptr) fil|eNames->|
|00004990| 6e 61 6d 65 73 29 3b 0d | 09 09 69 66 20 28 4d 65 |names);.|..if (Me|
|000049a0| 6d 45 72 72 6f 72 28 29 | 29 20 7b 0d 09 09 09 53 |mError()|) {....S|
|000049b0| 79 73 42 65 65 70 28 36 | 30 29 3b 0d 09 09 09 45 |ysBeep(6|0);....E|
|000049c0| 78 69 74 54 6f 53 68 65 | 6c 6c 28 29 3b 0d 09 09 |xitToShe|ll();...|
|000049d0| 7d 0d 09 09 66 69 6c 65 | 4e 61 6d 65 73 20 3d 20 |}...file|Names = |
|000049e0| 4e 55 4c 4c 3b 0d 09 48 | 55 6e 6c 6f 63 6b 28 75 |NULL;..H|Unlock(u|
|000049f0| 73 65 72 44 61 74 61 48 | 61 6e 64 6c 65 29 3b 0d |serDataH|andle);.|
|00004a00| 09 0d 09 44 69 73 70 6f | 73 65 48 61 6e 64 6c 65 |...Dispo|seHandle|
|00004a10| 28 75 73 65 72 44 61 74 | 61 48 61 6e 64 6c 65 29 |(userDat|aHandle)|
|00004a20| 3b 0d 09 69 66 20 28 4d | 65 6d 45 72 72 6f 72 28 |;..if (M|emError(|
|00004a30| 29 29 20 7b 0d 09 09 53 | 79 73 42 65 65 70 28 36 |)) {...S|ysBeep(6|
|00004a40| 30 29 3b 0d 09 09 45 78 | 69 74 54 6f 53 68 65 6c |0);...Ex|itToShel|
|00004a50| 6c 28 29 3b 0d 09 7d 0d | 7d 0d 00 00 00 00 00 00 |l();..}.|}.......|
|00004a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a80| 00 00 01 00 00 00 02 5e | 00 00 01 5e 00 00 00 76 |.......^|...^...v|
|00004a90| 01 00 00 0a 1e 2e 03 00 | 00 00 00 01 2d 78 e8 63 |........|....-x.c|
|00004aa0| 72 5c 01 03 18 12 1c 2e | 00 13 01 2e 2e 4f 55 cc |r\......|.....OU.|
|00004ab0| 0d 44 53 55 73 65 72 50 | 72 6f 63 73 2e 63 02 00 |.DSUserP|rocs.c..|
|00004ac0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00004ad0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00004ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004af0| 00 00 ab ed 4e fc 00 00 | 00 00 00 00 02 d4 10 06 |....N...|........|
|00004b00| 56 90 60 4c 01 ff 82 cc | 96 12 4f ef 00 0c 11 66 |V.`L....|..O....f|
|00004b10| 10 57 72 50 01 04 e2 8a | 8d 67 01 66 a0 96 73 01 |.WrP....|.g.f..s.|
|00004b20| 18 c0 ca 13 4e 5e 4e 75 | 4e 56 11 fd f0 5c 01 07 |....N^Nu|NV...\..|
|00004b30| 18 8c 4d 01 26 6d 11 fe | 0c 51 7e 12 00 92 4e ad |..M.&m..|.Q~...N.|
|00004b40| 01 2f ea 56 25 12 01 64 | 4e 91 67 de b4 03 b2 80 |./.V%..d|N.g.....|
|00004b50| 57 c0 02 40 66 78 01 1c | 00 76 9a 14 42 10 48 78 |W..@fx..|.v..B.Hx|
|00004b60| 0b ea 48 6e 9a 25 12 00 | 54 4e 91 76 11 fe 00 11 |..Hn.%..|TN.v....|
|00004b70| 42 10 12 20 54 0c a8 02 | 43 4c 49 50 11 00 54 12 |B.. T...|CLIP..T.|
|00004b80| 00 00 00 1e 00 56 00 18 | 01 dc 02 7c 00 56 00 18 |.....V..|...|.V..|
|00004b90| 01 dc 02 7c 00 00 05 4f | 00 00 00 00 00 00 00 00 |...|...O|........|
|00004ba0| 00 00 00 00 00 18 02 00 | 80 00 00 00 03 32 2e 30 |........|.....2.0|
|00004bb0| 0d 44 72 6f 70 53 68 65 | 6c 6c 20 32 2e 30 00 00 |.DropShe|ll 2.0..|
|00004bc0| 00 c8 00 09 00 00 35 07 | 00 00 35 19 13 44 69 73 |......5.|..5..Dis|
|00004bd0| 70 6f 73 65 55 73 65 72 | 47 6c 6f 62 61 6c 73 00 |poseUser|Globals.|
|00004be0| 00 00 05 fb 00 00 06 04 | 09 44 72 6f 70 53 68 65 |........|.DropShe|
|00004bf0| 6c 6c 00 00 39 55 00 00 | 39 60 0b 47 65 74 46 75 |ll..9U..|9`.GetFu|
|00004c00| 6c 6c 50 61 74 68 00 00 | 32 ae 00 00 32 bd 0f 49 |llPath..|2...2..I|
|00004c10| 6e 69 74 55 73 65 72 47 | 6c 6f 62 61 6c 73 00 00 |nitUserG|lobals..|
|00004c20| 20 81 00 00 20 8e 0d 50 | 72 6f 63 65 73 73 46 6f | ... ..P|rocessFo|
|00004c30| 6c 64 65 72 00 00 37 d5 | 00 00 37 e0 0b 50 72 6f |lder..7.|..7..Pro|
|00004c40| 63 65 73 73 49 74 65 6d | 00 00 40 67 00 00 40 78 |cessItem|..@g..@x|
|00004c50| 11 52 65 76 65 72 73 65 | 43 6f 70 79 50 32 43 53 |.Reverse|CopyP2CS|
|00004c60| 74 72 00 00 41 30 00 00 | 41 3b 0b 52 65 76 65 72 |tr..A0..|A;.Rever|
|00004c70| 73 65 43 53 74 72 00 00 | 30 89 00 00 30 93 0b 53 |seCStr..|0...0..S|
|00004c80| 65 6c 65 63 74 46 69 6c | 65 00 00 00 00 48 00 09 |electFil|e....H..|
|00004c90| 4d 6f 6e 61 63 6f 00 00 | 00 00 00 00 00 00 00 00 |Monaco..|........|
|00004ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cb0| 00 03 00 04 00 58 00 04 | 01 dc 02 7c 00 58 00 04 |.....X..|...|.X..|
|00004cc0| 01 dc 02 7c ab e9 92 f0 | 00 00 1d 32 00 00 1d 32 |...|....|...2...2|
|00004cd0| 00 00 1b 7e 01 00 00 00 | 00 04 00 01 00 01 00 00 |...~....|........|
|00004ce0| 01 00 00 00 02 5e 00 00 | 01 5e 00 00 00 76 00 75 |.....^..|.^...v.u|
|00004cf0| 86 c4 0e b2 00 00 00 1c | 00 72 00 02 4d 50 53 52 |........|.r..MPSR|
|00004d00| 00 02 00 1a 76 65 72 73 | 00 00 00 3e 4d 57 42 42 |....vers|...>MWBB|
|00004d10| 00 00 00 4a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...J....|........|
|00004d20| 03 ef 00 00 00 00 00 3e | 00 00 00 00 03 ed ff ff |.......>|........|
|00004d30| 00 00 01 0a 00 00 00 00 | 00 02 ff ff 00 00 00 22 |........|......."|
|00004d40| 00 00 00 00 03 f0 ff ff | 00 00 01 56 00 00 00 00 |........|...V....|
|00004d50| 03 74 61 62 00 00 00 00 | 00 00 00 00 00 00 00 00 |.tab....|........|
|00004d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+